Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added mechanism for importing certificates found in /data/ssl #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

exquisitus
Copy link

  • An ENTRYPOINT named start-java.sh was added to the Dockerfile
  • The ENTRYPOINT calls the import-certs.sh script before calling
    the COMMAND (argument of docker run) or CMD (defined in Dockerfile)
  • The import-certs.sh script uses the keytool to import any
    certificates it can find inside /data/ssl
  • Example: docker run -v"$(pwd)"/sample-certs:/data/ssl
    --rm mcreations/openwrt-java

Docker images which are based on this one and define a CMD but no
ENTRYPOINT will have any certificates mounted in /data/ssl
imported automatically.

Docker images which are based on this one and define an ENTRYPOINT
will override the start-java.sh ENTRYPOINT and thus will not have
certificates loaded. For this case, there exist the alternatives:

  • Change ENTRYPOINT to CMD if possible
  • Change the ENTRYPOINT script to call /usr/local/bin/import-certs.sh
    directly

- An ENTRYPOINT named start-java.sh was added to the Dockerfile
- The ENTRYPOINT calls the import-certs.sh script before calling
  the COMMAND (argument of docker run) or CMD (defined in Dockerfile)
- The import-certs.sh script uses the keytool to import any
  certificates it can find inside /data/ssl
- Example: docker run -v"$(pwd)"/sample-certs:/data/ssl \
                      --rm mcreations/openwrt-java

Docker images which are based on this one and define a CMD but no
ENTRYPOINT will have any certificates mounted in /data/ssl
imported automatically.

Docker images which are based on this one and define an ENTRYPOINT
will override the start-java.sh ENTRYPOINT and thus will not have
certificates loaded. For this case, there exist the alternatives:
- Change ENTRYPOINT to CMD if possible
- Change the ENTRYPOINT script to call /usr/local/bin/import-certs.sh
  directly
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.

1 participant