container: use apt instead of apt-get

This commit is contained in:
Username
2026-01-18 10:46:47 +01:00
parent ba0e591dda
commit 6c0e2ab07f

View File

@@ -8,10 +8,8 @@ FROM python:3.11-slim AS builder
WORKDIR /build
# Install build dependencies and clean up
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt update && apt install -y --no-install-recommends gcc \
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create virtual environment
RUN python -m venv /opt/venv
@@ -32,7 +30,7 @@ LABEL maintainer="FlaskPaste"
LABEL description="Lightweight secure pastebin REST API"
# Clean base image caches and create non-root user
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& groupadd -r flaskpaste && useradd -r -g flaskpaste flaskpaste
# Copy virtual environment from builder