Git Product home page Git Product logo

Comments (4)

vromero avatar vromero commented on June 8, 2024

I don't completely understand can you elaborate with an example? Why wouldn't an extended image with custom-entrypoint.sh and a cutom ENTRYPOINT ["/custom-entrypoint.sh"] that do its magic and then leverages the original docker-entrypoint.sh woudn't work?

from activemq-artemis-docker.

cliff-hayden avatar cliff-hayden commented on June 8, 2024

This is my sample, which I used to prove what I was running into was true.
Dockerfile:

FROM vromero/activemq-artemis:2.5.0
USER artemis
COPY entrypoint.sh ./entrypoint.sh
ENTRYPOINT ["./entrypoint.sh"]

entrypoint.sh

#!/bin/bash
ls -la
./docker-entrypoint.sh

Output: when I issue docker run

total 20
drwxr-xr-x  2 artemis artemis 4096 May 31 18:50 .
drwxr-xr-x 16 artemis artemis 4096 May 31 18:50 ..
-rwxrwxr-x  1 artemis artemis 3594 May 31 13:21 artemis
-rwxrwxr-x  1 artemis artemis 3292 May 31 13:21 artemis-service
-rwxr-xr-x  1 root    root      42 May 31 18:46 entrypoint.sh
./entrypoint.sh: line 3: ./docker-entrypoint.sh: No such file or directory

from activemq-artemis-docker.

cliff-hayden avatar cliff-hayden commented on June 8, 2024

Your Dockerfile ends with:

COPY assets/docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["artemis-server"]

The COPY chains into the ENTRYPOINT, which means that overriding the ENTRYPOINT causes the COPY to not happen, so I am not able to replace the ENTRYPOINT and chain into docker-entrypoint.sh from my script.

from activemq-artemis-docker.

vromero avatar vromero commented on June 8, 2024

Your entrypoint is wrong:

./entrypoint.sh: line 3: ./docker-entrypoint.sh: No such file or directory

Change it from :

#!/bin/bash
ls -la
./docker-entrypoint.sh

To

#!/bin/bash
ls -la
/docker-entrypoint.sh "$@"

Also notice you can't chain stances like COPY and ENTRYPOINT, plus the last character is a / not a \.

However, I'll think about supporting some kind of run-parts or similar. I'm not particularly keen on it as off the top of my head sounds like something that should be done in a child image just like you are doing.

from activemq-artemis-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.