Skip to content

Commit

Permalink
--chmod support for COPY and ADD
Browse files Browse the repository at this point in the history
  • Loading branch information
shalk committed Aug 6, 2024
1 parent a7957a2 commit 14a4ea6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker_templates/alpine-linux.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ ENV JAVA_VERSION {{ java_version }}
{% include 'partials/multi-arch-install.j2' %}

{% include 'partials/version-check.j2' %}
COPY entrypoint.sh /__cacert_entrypoint.sh
COPY --chmod=755 entrypoint.sh /__cacert_entrypoint.sh
ENTRYPOINT ["/__cacert_entrypoint.sh"]
{% include 'partials/jshell.j2' %}
4 changes: 2 additions & 2 deletions docker_templates/ubi9-minimal.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ ENV JAVA_VERSION {{ java_version }}
{% include 'partials/multi-arch-install.j2' %}

{% include 'partials/version-check.j2' %}
COPY entrypoint.sh /__cacert_entrypoint.sh
COPY --chmod=755 entrypoint.sh /__cacert_entrypoint.sh
ENTRYPOINT ["/__cacert_entrypoint.sh"]
{% include 'partials/jshell.j2' %}
{% include 'partials/jshell.j2' %}
4 changes: 2 additions & 2 deletions docker_templates/ubuntu.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ ENV JAVA_VERSION {{ java_version }}
{% endif %}
{% include 'partials/version-check.j2' %}
COPY entrypoint.sh /__cacert_entrypoint.sh
ENTRYPOINT ["/__cacert_entrypoint.sh"]
{% include 'partials/jshell.j2' %}
ENTRYPOINT --chmod=755 ["/__cacert_entrypoint.sh"]
{% include 'partials/jshell.j2' %}
1 change: 0 additions & 1 deletion generate_dockerfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,5 @@ def archHelper(arch, os_name):
os.path.join(output_directory, "entrypoint.sh"), "w"
) as out_file:
out_file.write(entrypoint)
os.chmod(os.path.join(output_directory, "entrypoint.sh"), 0o755)

print("Dockerfiles generated successfully!")

0 comments on commit 14a4ea6

Please sign in to comment.