Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 738 Bytes

File metadata and controls

14 lines (10 loc) · 738 Bytes

The Difference Between CMD and ENTRYPOINT

I did not realize that CMD and ENTRYPOINT could co-exist. My intended outcome was to find out how to leverage the same image to perform an initialization activity prior to starting a container hosted service. Mission accomplished!

ENTRYPOINT ["java", "-jar", "lib/service.jar"]
CMD ["foo", "bar"]

References

  1. Understand how CMD and ENTRYPOINT interact - Dockerfile reference
  2. What is the difference between CMD and ENTRYPOINT in a Dockerfile?
  3. Ubuntu Dockerfile