Skip to content

Commit

Permalink
🎨 #156 コンテナ起動時に起きる以下のエラーを修正
Browse files Browse the repository at this point in the history
Error: Invalid value for '--port': '${PORT}' is not a valid integer.
  • Loading branch information
keitakn committed Dec 13, 2024
1 parent 95182b4 commit aa969f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG PYTHON_VERSION=3.12.4
ARG PORT=5000

FROM python:${PYTHON_VERSION}-slim AS build

Expand All @@ -25,10 +24,10 @@ RUN uv export -o requirements.txt --no-hashes

RUN pip install --no-cache-dir --upgrade -r requirements.txt

EXPOSE ${PORT}
EXPOSE 5000

ENV SSL_CERT_PATH /etc/ssl/certs/ca-certificates.crt

COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "${PORT}"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]

0 comments on commit aa969f3

Please sign in to comment.