Skip to content

MODWRKFLOW-66: Utilize relatively new Docker feature to change mode on COPY.#156

Merged
kaladay merged 2 commits into
masterfrom
MODWRKFLOW-66
Jun 24, 2026
Merged

MODWRKFLOW-66: Utilize relatively new Docker feature to change mode on COPY.#156
kaladay merged 2 commits into
masterfrom
MODWRKFLOW-66

Conversation

@kaladay

@kaladay kaladay commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

MODWRKFLOW-66

This avoids relying on user space within the container to explicitly run chmod. This reduces the security burden if/when a chmod has some exploit and needs updating.

This also reduces the extra duplication that Docker creates for every change. A separate RUN chmod command would result in a duplication of the entire JAR file and possibly other files within the image. Using COPY --chmod= avoids this.

Be warned that this is a new feature and older Docker clients may have problems building this.

…n COPY.

This avoids relying on user space within the container to explicitly run `chmod`.
This reduces the security burden if/when a `chmod` has some exploit and needs updating.

This also reduces the extra duplication that Docker creates for every change.
A separate `RUN chmod` command would result in a duplication of the entire JAR file and possibly other files within the image.
Using `COPY --chmod=` avoids this.

Be warned that this is a new feature and older **Docker** clients may have problems building this.
@kaladay kaladay requested a review from a team June 23, 2026 18:26

@JamesS-TAMU JamesS-TAMU left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Built successfully under both Linux file system and mounted Windows file system.

@sonarqubecloud

Copy link
Copy Markdown

@kaladay kaladay merged commit f671b37 into master Jun 24, 2026
16 checks passed
@kaladay kaladay deleted the MODWRKFLOW-66 branch June 24, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants