I don't think I have the right title, but I'm not 100% sure what the correct one would be. I'm attempting to containerize a Python program that I have which can run as either a server or client based on CLI arguments. I was able to do it successfully by saying:
FROM python:3.5
ADD program/ program/
WORKDIR program/
ENTRYPOINT ["python", "program.py"]
which I can then run with docker run -d program server <port> <protocol>
(or client
) and it works properly.
I run into problems though, when I try to create images based on the previous image.
For example, if I want to create a server specific image, I tried:
FROM program
ENTRYPOINT ["server"]
and then my goal would be to run it by saying docker run programServer <port> <protocol>
, however when I attempt that I get an executable file not found in $PATH"
error.
Is there something that I'm missing, or are you not able to "daisy-chain" images this way?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…