Skip to content

Building Docker fails to chmod it .sh files #1304

Description

@joan38

I have a script in src/docker/opt/docker/bin/launch.sh.

The generated Dockerfile:

RUN ["chmod", "-R", "u=rX,g=rX", "/opt/docker"]
RUN ["chmod", "u+x,g+x", "/opt/docker/bin/server"]
RUN ["chmod", "u+x,g+x", "opt/docker/bin/launch.sh"]

See the missing / in front of opt that leads to the following error when Docker/publishLocal:

chmod: cannot access 'opt/docker/bin/launch.sh': No such file or directory

Workaround:

inConfig(Docker)(
  dockerPackageMappings := MappingsHelper
    .contentOf(sourceDirectory.value)
    .map { case (from, to) => from -> Paths.get("/", to).toString }
)

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions