Skip to content

Commit

Permalink
fix[dockerfile]: switch common image from alpine to bookworm-slim to …
Browse files Browse the repository at this point in the history
…fix polytope-mars install
  • Loading branch information
peshence committed Jan 16, 2025
1 parent f2f9111 commit f5e1e11
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ ARG gribjump_base=blank-base

#######################################################
# C O M M O N
# based on alpine linux
# based on python bookworm slim
#######################################################

FROM python:3.11-alpine AS polytope-common
FROM python:3.11-slim-bookworm AS polytope-common

ARG HOME_DIR=/home/polytope
ARG developer_mode

# Install build dependencies
RUN apk add --no-cache --virtual .build-deps gcc musl-dev openldap-dev curl \
&& apk add --no-cache openldap
RUN apt update && apt install -y --no-install-recommends gcc libc6-dev libldap2-dev curl \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

# Create user and group
RUN set -eux \
Expand Down Expand Up @@ -77,14 +78,6 @@ RUN set -eux \
# Install the application
RUN uv pip install --upgrade .

# Clean up build dependencies to reduce image size
USER root
RUN apk del .build-deps


# Switch back to polytope user
USER polytope


#######################################################
# N O O P I M A G E
Expand Down

0 comments on commit f5e1e11

Please sign in to comment.