Skip to content

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