I have a rather simple issue I cannot figure out. This is the last bit of my Dockerfile:
ARG CLUSTER_NAME
ARG GIT_BRANCH
RUN echo "CLUSTER_NAME: ${CLUSTER_NAME}"
RUN echo "GIT_BRANCH: ${GIT_BRANCH}"
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["infrastructure/ecs/scripts/startup.sh", "user_server", "${CLUSTER_NAME}", "${GIT_BRANCH}"]
And in the startup.sh scripts I get retrieve these args as
SERVICE_NAME="${1}"
CLUSTER_NAME="${2}"
BRANCH_NAME="${3}"
When building the Docker image I can see that ARGS CLUSTER_NAME
and GIT_BRANCH
are correctly echo'ed, but inside the script, args ${2} and ${3} are empty.
Is there another way to pass args in CMD
?