Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

During dockerBuild, dockerCopyMappings doesn't retain file flags #266

Closed
ckarenz opened this issue Dec 2, 2016 · 1 comment · Fixed by #270
Closed

During dockerBuild, dockerCopyMappings doesn't retain file flags #266

ckarenz opened this issue Dec 2, 2016 · 1 comment · Fixed by #270
Assignees

Comments

@ckarenz
Copy link
Contributor

ckarenz commented Dec 2, 2016

The ENTRYPOINT directive requires its target to be executable. If this target is a script copied through dockerCopyMappings, the file doesn't retain its +x flag. Though the build succeeds, this ultimately causes the container to fail to start.

The workaround from Jesse works:

ENTRYPOINT ["sh", "-c", "chmod +x my_script; exec my_script"]
@jkinkead
Copy link
Contributor

jkinkead commented Dec 2, 2016

We use sbt's IO class for our copying, and it doesn't attempt to preserve file permissions. If we wish to do this for both files and directories, we'll need to replicate the copyDirectory behavior here, and setExecutable() iff the source file is executable.

jkinkead pushed a commit to jkinkead/sbt-plugins that referenced this issue Dec 12, 2016
jkinkead added a commit that referenced this issue Dec 13, 2016
* Fix cache key generation.

This has several fixes / changes:
- changes to remote dependencies will be detected
- cache keys will remain stable accross rebuilds
- cache keys will not be generated on dirty repos (same behavior as old
  deploy plugin)

* Verify that images still exist before considering a build cached.

Fixes #268 .

* Set executable permissions as appropriate.

Fixes #266 .

* Make logic more correct and simple.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants