Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Combine RUN steps

Roland Geider0911741288f6
diff --git a/extras/docker/demo/Dockerfile b/extras/docker/demo/Dockerfile
index a88164641..9466c5ecb 100644
--- a/extras/docker/demo/Dockerfile
+++ b/extras/docker/demo/Dockerfile
@@ -20,7 +20,8 @@
FROM wger/base:latest AS builder
ARG DEBIAN_FRONTEND=noninteractive
-RUN apt update \
+RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
+ && apt update \
&& apt install --no-install-recommends -y \
build-essential \
python3-dev \
@@ -33,18 +34,13 @@ RUN apt update \
rustc \
cargo \
sassc \
- && ln -s /usr/bin/sassc /usr/bin/sass
-
-# Need a newer node than what's in ubuntu
-RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
- && apt-get update \
- && apt-get install -y nodejs \
+ nodejs \
+ && ln -s /usr/bin/sassc /usr/bin/sass \
&& rm -rf /var/lib/apt/lists/* \
&& corepack enable
# Build the necessary python wheels
# Note that the --mount is a workaround for https://github.com/rust-lang/cargo/issues/8719
-#COPY . /home/wger/src
WORKDIR /home/wger/src
COPY pyproject.toml /home/wger/src
diff --git a/extras/docker/production/Dockerfile b/extras/docker/production/Dockerfile
index 7a418ac42..5d7aca114 100644
--- a/extras/docker/production/Dockerfile
+++ b/extras/docker/production/Dockerfile
@@ -14,7 +14,9 @@
FROM wger/base:latest AS builder
ARG DEBIAN_FRONTEND=noninteractive
-RUN apt update \
+# Need a newer node than what's in ubuntu
+RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
+ && apt update \
&& apt install --no-install-recommends -y \
build-essential \
python3-dev \
@@ -28,16 +30,12 @@ RUN apt update \
sassc \
cargo \
unzip \
- && rm -rf /var/lib/apt/lists/*
-
-# Need a newer node than what's in ubuntu
-RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
- && apt-get update \
- && apt-get install -y nodejs \
+ nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& corepack enable \
&& mkdir -p /root/src/wger/core/static
+
#
# Build the python wheels
#