Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile, fix Sonarcloud issue #3180

Merged
merged 12 commits into from
Jul 8, 2024
4 changes: 2 additions & 2 deletions boefjes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ARG USER_GID=1000

ENTRYPOINT ["/app/boefjes/entrypoint.sh"]

RUN groupadd --gid $USER_GID nonroot
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID nonroot
RUN groupadd --gid "$USER_GID" nonroot
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" nonroot

WORKDIR /app/boefjes
ENV PATH=/home/nonroot/.local/bin:${PATH}
Expand Down
11 changes: 6 additions & 5 deletions bytes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ARG PYTHON_VERSION=3.11
FROM python:$PYTHON_VERSION-bookworm AS dev

EXPOSE 8000

ARG USER_UID=1000
ARG USER_GID=1000
ARG PORT=8000

EXPOSE $PORT

ENTRYPOINT ["/app/bytes/entrypoint.sh"]

RUN groupadd --gid $USER_GID bytes
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID bytes
RUN groupadd --gid "$USER_GID" bytes
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" bytes

WORKDIR /app/bytes
ENV PATH=/home/bytes/.local/bin:${PATH}
Expand All @@ -33,4 +34,4 @@ FROM dev

COPY . .

CMD ["uvicorn", "bytes.api:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "bytes.api:app", "--host", "0.0.0.0", "--port", $PORT]
11 changes: 6 additions & 5 deletions keiko/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
ARG PYTHON_VERSION=3.11
FROM python:$PYTHON_VERSION-bookworm AS dev

EXPOSE 8000

ARG USER_UID=1000
ARG USER_GID=1000
ARG PORT=8000

EXPOSE $PORT

RUN groupadd --gid $USER_GID keiko
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID keiko
RUN groupadd --gid "$USER_GID" keiko
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" keiko

WORKDIR /app/keiko
ENV PATH=/home/keiko/.local/bin:${PATH}
Expand Down Expand Up @@ -45,4 +46,4 @@ FROM dev

COPY . .

CMD ["uvicorn", "keiko.app:api", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "keiko.app:api", "--host", "0.0.0.0", "--port", $PORT]
9 changes: 5 additions & 4 deletions mula/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
ARG PYTHON_VERSION=3.11
FROM python:$PYTHON_VERSION-bookworm AS dev

EXPOSE 8000

ARG USER_UID=1000
ARG USER_GID=1000
ARG PORT=8000

EXPOSE $PORT

ENTRYPOINT ["/app/scheduler/entrypoint.sh"]

RUN groupadd --gid $USER_GID scheduler
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID scheduler
RUN groupadd --gid "$USER_GID" scheduler
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" scheduler

WORKDIR /app/scheduler
ENV PATH=/home/scheduler/.local/bin:${PATH}
Expand Down
11 changes: 6 additions & 5 deletions octopoes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
ARG PYTHON_VERSION=3.11
FROM python:$PYTHON_VERSION-bookworm AS dev

EXPOSE 8000

ARG USER_UID=1000
ARG USER_GID=1000
ARG PORT=8000

EXPOSE $PORT

WORKDIR /app/octopoes

ENTRYPOINT ["/app/octopoes/entrypoint.sh"]

RUN groupadd --gid $USER_GID octopoes
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID octopoes
RUN groupadd --gid "$USER_GID" octopoes
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" octopoes

ENV PATH=/home/octopoes/.local/bin:${PATH}

Expand All @@ -30,4 +31,4 @@ FROM dev

COPY . .

CMD ["uvicorn", "octopoes.api.api:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "octopoes.api.api:app", "--host", "0.0.0.0", "--port", $PORT]
4 changes: 2 additions & 2 deletions rocky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ ARG USER_GID=1000

ENTRYPOINT ["/app/rocky/entrypoint.sh"]

RUN groupadd --gid $USER_GID rocky
RUN adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID rocky
RUN groupadd --gid "$USER_GID" rocky
RUN adduser --disabled-password --gecos '' --uid "$USER_UID" --gid "$USER_GID" rocky

WORKDIR /app/rocky

Expand Down
Loading