Skip to content

Commit 137d7cb

Browse files
committed
build: switch to debian
apline sucks
1 parent 619b63d commit 137d7cb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ __pycache__/
3737
dict/
3838
docker/
3939
commitlint.config.js
40+
.hadolint.yaml
41+
celerybeat-schedule*
42+
.mypy_cache
43+
public

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# base image
2-
FROM python:3.10.8-alpine as python-base
2+
FROM python:3.10-slim as python-base
33

44
ENV PYTHONFAULTHANDLER=1 \
55
PYTHONHASHSEED=random \
@@ -12,22 +12,22 @@ ENV PATH="$VENV_PATH/bin:$PATH"
1212

1313
WORKDIR $APP_PATH
1414

15-
RUN adduser -Ds /bin/bash sentry
15+
RUN useradd -ms /bin/bash sentry
1616

1717

1818
# Build
1919
FROM python-base as builder-base
2020

21-
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
21+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
2222

2323
ENV PIP_DEFAULT_TIMEOUT=100 \
2424
PIP_DISABLE_PIP_VERSION_CHECK=1 \
2525
PIP_NO_CACHE_DIR=1
2626

2727
# get poetry
28-
RUN apk update \
29-
&& apk add --update --no-cache curl gcc linux-headers build-base \
30-
&& curl -sSL https://install.python-poetry.org | python -
28+
RUN apt-get update && \
29+
apt-get install -y --no-install-recommends curl && \
30+
curl -sSL https://install.python-poetry.org | python -
3131

3232
RUN python -m venv "$VENV_PATH"
3333

@@ -57,8 +57,6 @@ COPY --from=static-base /app/assets /usr/share/nginx/html
5757
FROM python-base as production
5858
COPY --from=builder-base $APP_PATH $APP_PATH
5959

60-
COPY . $APP_PATH
61-
6260
RUN chmod u+rwx "$APP_PATH/manage.py"
6361

6462
USER sentry

0 commit comments

Comments
 (0)