Skip to content

Commit 74892e4

Browse files
committed
chore: Use a single COPY by better leveraging .dockerignore patterns
1 parent e02e8be commit 74892e4

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
# Exclude everything from the Docker build context:
2+
*
3+
4+
# Except for this content:
5+
!bin/
6+
!etc/
7+
!testssl.sh
8+
9+
# But additionally exclude this nested content:
110
bin/openssl.Darwin.*
211
bin/openssl.FreeBSD.*

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ RUN apk update && \
1212
USER testssl
1313
WORKDIR /home/testssl/
1414

15-
COPY --chown=testssl:testssl etc/. /home/testssl/etc/
16-
COPY --chown=testssl:testssl bin/. /home/testssl/bin/
17-
COPY --chown=testssl:testssl testssl.sh /home/testssl/
15+
# Copy over build context (after filtered by .dockerignore): bin/ etc/ testssl.sh
16+
COPY --chown=testssl . /home/testssl/
1817

1918
ENTRYPOINT ["testssl.sh"]
2019

0 commit comments

Comments
 (0)