Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run chmod +x explicitly in stage0 #1201

Merged
merged 2 commits into from
Feb 12, 2019
Merged

Run chmod +x explicitly in stage0 #1201

merged 2 commits into from
Feb 12, 2019

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Feb 8, 2019

This is on top of #1200

Using sbt-native-packager 1.3.17 with OpenShift, I still ran into some permission issues and needed to call chmod +x explicitly in the container. This will emit chmod +x for all bash scripts that was generated.

RUN ["chmod", "u=+x,g=+x", "/opt/docker/bin/file-permission-test"]

Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot 🤗

Should we add this to the settings page in docker.rst as well? I can merge and release this and docs can be a follow up pr.

* Gives +x permission to users and groups.
*/
case object UserGroupPlusExecute extends DockerChmodType {
def argument: String = "u=+x,g=+x"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a mistake. It should be u+x,g+x.

Using sbt-native-packager 1.3.17 with OpenShift, I still ran into some permission issues and needed to call chmod +x explicitly in the container. This will emit chmod +x for all bash scripts that was generated.
@eed3si9n
Copy link
Member Author

@muuki88 Fixed a bug that the tests caught, and also updated the docs.

Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Will merge after CI has finished.

@muuki88 muuki88 added the docker label Feb 12, 2019
@muuki88 muuki88 merged commit b8b9f2d into sbt:master Feb 12, 2019
@eed3si9n eed3si9n deleted the wip/chmod branch February 12, 2019 15:10
@@ -108,6 +108,16 @@ object DockerPlugin extends AutoPlugin {
},
dockerRmiCommand := dockerExecCommand.value ++ Seq("rmi"),
dockerBuildCommand := dockerExecCommand.value ++ Seq("build") ++ dockerBuildOptions.value ++ Seq("."),
dockerAdditionalPermissions := {
val scripts = makeBashScripts.value
Copy link
Contributor

@muuki88 muuki88 Feb 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I overlooked that. This causes a circular dependency between JavaAppPackaging and the DockerPlugin, which produces a bug reported in #1205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants