i think machine related, i'm not sure. i'm using current docker toolbox docker 1.10.3 on osx have project using dockerfile, copies code container this:
[...] copy . /code volume /code workdir /code [...]
for faster local development (test execution), mount current directory in compose file
[...] volumes: - .:/code [...]
and execute
docker-compose -f docker-compose.yml -f docker-compose.testing.yml run web py.test
now, looks have 2 different folders/files: when running container , looking inside file vi, looks on host. changing files , executing our tests (pytest, specifically) lets python interpreter read garbage can't execute tests.
example
the end of file looks (which got copied in dockerfile container):
post_save.connect(backup_something, sender=somesender, dispatch_uid='backup_something') foobar raises error when executing, change post_save.connect(backup_something, sender=somesender, dispatch_uid='backup_something')
the file looks fine now, both host , inside container. executing pytest, still reads content of copied code, breaking tests locally me.
if change more, it's neither copied nor mounted file, stuff breaks @ random positions:
file "/code/some_code.py", line 69 dispatch_uid='backup_ ^
syntaxerror: eol while scanning string literal (tail shows correct syntax etc, there nothing broken code)
is there wrong our setup or machine being broken somehow? tried restarting , recreating docker machine doesn't help.
i try mount in read mode , double check filesystem type if there's strange. years ago there bug ntfs-3g corrupting files, maybe it's similar (obviously not ntfs because on os x)
Comments
Post a Comment