diff --git a/.dockerignore b/.dockerignore index 7cd827c..bbc4f67 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,11 @@ +# Exclude everything from the Docker build context: +* + +# Except for this content: +!bin/ +!etc/ +!testssl.sh + +# But additionally exclude this nested content: bin/openssl.Darwin.* bin/openssl.FreeBSD.* diff --git a/Dockerfile b/Dockerfile index 1e14995..92a42c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,8 @@ RUN apk update && \ USER testssl WORKDIR /home/testssl/ -COPY --chown=testssl:testssl etc/. /home/testssl/etc/ -COPY --chown=testssl:testssl bin/. /home/testssl/bin/ -COPY --chown=testssl:testssl testssl.sh /home/testssl/ +# Copy over build context (after filtered by .dockerignore): bin/ etc/ testssl.sh +COPY --chown=testssl:testssl . /home/testssl/ ENTRYPOINT ["testssl.sh"]