build(docker): update CMD to use shell for environment variable expansion in Dockerfiles
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
9b42dbfa7f
commit
da584b8ffa
@ -35,4 +35,5 @@ COPY . ${CONTAINER_APP_ROOT}
|
|||||||
#RUN ln -s /bin/bash /usr/bin/bash
|
#RUN ln -s /bin/bash /usr/bin/bash
|
||||||
|
|
||||||
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
||||||
CMD ["uvicorn", "webapi.main:app", "--reload", "--port=${SERVICE_API_ACCESS_PORT}", "--host=${SERVICE_API_ACCESS_HOST}"]
|
# Using shell to expand environemnt to enure pass the actual environment value to uvicorn
|
||||||
|
CMD uvicorn webapi.main:app --reload --port=$SERVICE_API_ACCESS_PORT --host=$SERVICE_API_ACCESS_HOST
|
||||||
|
|||||||
@ -35,4 +35,5 @@ COPY . ${CONTAINER_APP_ROOT}
|
|||||||
#RUN ln -s /bin/bash /usr/bin/bash
|
#RUN ln -s /bin/bash /usr/bin/bash
|
||||||
|
|
||||||
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
||||||
CMD ["uvicorn", "webapi.main:app", "--reload", "--port=${SERVICE_API_ACCESS_PORT}", "--host=${SERVICE_API_ACCESS_HOST}"]
|
# Using shell to expand environemnt to enure pass the actual environment value to uvicorn
|
||||||
|
CMD uvicorn webapi.main:app --reload --port=$SERVICE_API_ACCESS_PORT --host=$SERVICE_API_ACCESS_HOST
|
||||||
@ -34,4 +34,5 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
COPY . ${CONTAINER_APP_ROOT}
|
COPY . ${CONTAINER_APP_ROOT}
|
||||||
|
|
||||||
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
||||||
CMD ["uvicorn", "webapi.main:app", "--reload", "--port=${SERVICE_API_ACCESS_PORT}", "--host=${SERVICE_API_ACCESS_HOST}"]
|
# Using shell to expand environemnt to enure pass the actual environment value to uvicorn
|
||||||
|
CMD uvicorn webapi.main:app --reload --port=$SERVICE_API_ACCESS_PORT --host=$SERVICE_API_ACCESS_HOST
|
||||||
@ -29,5 +29,5 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
COPY . ${CONTAINER_APP_ROOT}
|
COPY . ${CONTAINER_APP_ROOT}
|
||||||
|
|
||||||
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
EXPOSE ${SERVICE_API_ACCESS_PORT}
|
||||||
#CMD ["uvicorn", "webapi.main:app", "--reload", "--port=${SERVICE_API_ACCESS_PORT}", "--host=${SERVICE_API_ACCESS_HOST}"]
|
# Using shell to expand environemnt to enure pass the actual environment value to uvicorn
|
||||||
CMD uvicorn webapi.main:app --reload --port=${SERVICE_API_ACCESS_PORT} --host=${SERVICE_API_ACCESS_HOST}
|
CMD uvicorn webapi.main:app --reload --port=${SERVICE_API_ACCESS_PORT} --host=${SERVICE_API_ACCESS_HOST}
|
||||||
Loading…
Reference in New Issue
Block a user