forked from username/flaskpaste
container: use apt instead of apt-get
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user