chore: Update Dockerfile for Linux distributions

This commit is contained in:
Théophile Diot 2024-08-30 11:04:06 +02:00
parent 3c4965a41e
commit 8f0880f018
No known key found for this signature in database
GPG key ID: FA995104A0BA376A
6 changed files with 6 additions and 114 deletions

View file

@ -39,10 +39,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --break-system-packages --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --break-system-packages --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -59,21 +55,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM debian:bookworm-slim@sha256:d02c76d82364cedca16ba3ed6f9102406fa9fa8833076a609cabf14270f43dfc

View file

@ -35,10 +35,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -55,21 +51,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM fedora:40@sha256:5ce8497aeea599bf6b54ab3979133923d82aaa4f6ca5ced1812611b197c79eb0

View file

@ -46,10 +46,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -66,21 +62,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM redhat/ubi8:8.10@sha256:d5e2d1ddf34b573673581940f1341c7b3301ff8efde28f17100b31a3df7d94b6

View file

@ -47,10 +47,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
python3 -m pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
python3 -m pip install --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf install -y --setopt=install_weak_deps=False nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -67,21 +63,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM redhat/ubi9:9.4@sha256:9e6a89ab2a9224712391c77fab2ab01009e387aff42854826427aaf18b98b1ff

View file

@ -39,10 +39,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --break-system-packages --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --break-system-packages --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -59,21 +55,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM ubuntu:24.04@sha256:562456a05a0dbd62a671c1854868862a4687bf979a96d48ae8e766642cd911e8

View file

@ -39,10 +39,6 @@ RUN export MAKEFLAGS="-j$(nproc)" && \
pip install --no-cache-dir --require-hashes --ignore-installed -r /tmp/requirements-deps.txt && \
pip install --no-cache-dir --require-hashes --target deps/python $(for file in $(ls /tmp/req/requirements*.txt) ; do echo "-r ${file}" ; done | xargs)
# Install node and npm to build vite frontend
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs
# Copy files
# can't exclude deps from . so we are copying everything by hand
COPY src/bw/loading loading
@ -59,21 +55,7 @@ COPY src/common/settings.json settings.json
COPY src/common/utils utils
COPY src/scheduler scheduler
COPY src/VERSION VERSION
COPY src/ui/client ui/client
# This will build the frontend and add files to the UI folder
WORKDIR /usr/share/bunkerweb/ui/client
RUN DOCKERFILE=yes python3 build.py
# We can delete the client folder after building the frontend
RUN rm -rf /usr/share/bunkerweb/ui/client
WORKDIR /usr/share/bunkerweb
COPY src/ui/pages ui/pages
COPY src/ui/src ui/src
COPY src/ui/*.py ui/
COPY src/ui ui
FROM ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221