forked from claw/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
|
WORKDIR /build
|
||||||
|
|
||||||
# Install build dependencies and clean up
|
# Install build dependencies and clean up
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt update && apt install -y --no-install-recommends gcc \
|
||||||
gcc \
|
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
# Create virtual environment
|
# Create virtual environment
|
||||||
RUN python -m venv /opt/venv
|
RUN python -m venv /opt/venv
|
||||||
@@ -32,7 +30,7 @@ LABEL maintainer="FlaskPaste"
|
|||||||
LABEL description="Lightweight secure pastebin REST API"
|
LABEL description="Lightweight secure pastebin REST API"
|
||||||
|
|
||||||
# Clean base image caches and create non-root user
|
# 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
|
&& groupadd -r flaskpaste && useradd -r -g flaskpaste flaskpaste
|
||||||
|
|
||||||
# Copy virtual environment from builder
|
# Copy virtual environment from builder
|
||||||
|
|||||||
Reference in New Issue
Block a user