Skip to content

Commit 48d9357

Browse files
committed
refactor: remove redundant build stage and streamline Dockerfile
1 parent 72f6012 commit 48d9357

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

Dockerfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ ENV LC_ALL=en_US.UTF-8 \
4444
LANGUAGE=en_US:en
4545

4646
# Build stage
47-
FROM base as builder
47+
FROM base
4848

4949
ARG PRETALX_VERSION
50+
ARG PRETALX_UID
51+
ARG PRETALX_GID
5052

5153
# Clone target pretalx repository
5254
WORKDIR /build
@@ -62,24 +64,13 @@ RUN --mount=type=cache,target=/root/.cache/pip \
6264
# Install wheel + extras
6365
RUN --mount=type=cache,target=/root/.cache/pip \
6466
python -m pip install dist/pretalx*whl
65-
# Final stage
66-
FROM base
67-
68-
ARG PRETALX_UID
69-
ARG PRETALX_GID
70-
71-
72-
RUN pip install packaging
7367

7468
# Create pretalx user
7569
RUN groupadd -f -g ${PRETALX_GID} pretalx && \
7670
useradd -u ${PRETALX_UID} -g ${PRETALX_GID} -m -d /pretalx -s /bin/bash pretalx && \
7771
mkdir -p /data/media /data/static /data/logs /public/media /public/static && \
7872
chown -R pretalx:pretalx /data /public
7973

80-
# Copy installed dependencies and application
81-
COPY --from=builder /install /usr/local
82-
8374
# Create deployment directory
8475
RUN mkdir -p /etc/pretalx
8576

0 commit comments

Comments
 (0)