container: update Dockerfile (DEBIAN_FRONTEND='noninteractive')

This commit is contained in:
naskya 2024-02-07 23:36:37 +09:00
parent 42fc787731
commit b0274a5ee4
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -3,12 +3,9 @@ FROM node:20-slim as build
WORKDIR /firefish
# Install compilation dependencies
RUN apt-get update && apt-get install -y python3 git wget curl build-essential
RUN mkdir -m777 /opt/rust /opt/cargo
ENV RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/cargo PATH=/opt/cargo/bin:$PATH
RUN wget --https-only --secure-protocol=TLSv1_2 -O- https://sh.rustup.rs | sh /dev/stdin -y
RUN printf '#!/bin/sh\nexport CARGO_HOME=/opt/cargo\nexec /bin/sh "$@"\n' >/usr/local/bin/sh
RUN chmod +x /usr/local/bin/sh
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends curl build-essential ca-certificates
RUN curl --proto '=https' --tlsv1.2 --silent --show-error --fail https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy only the cargo dependency-related files first, to cache efficiently
COPY packages/backend/native-utils/Cargo.toml packages/backend/native-utils/Cargo.toml
@ -52,7 +49,7 @@ FROM node:20-slim
WORKDIR /firefish
# Install runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends zip unzip tini ffmpeg
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends zip unzip tini ffmpeg
COPY . ./