Skip to content

Commit 0911741

Browse files
committed
Combine RUN steps
1 parent 9e878dc commit 0911741

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

extras/docker/demo/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
FROM wger/base:latest AS builder
2121
ARG DEBIAN_FRONTEND=noninteractive
2222

23-
RUN apt update \
23+
RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
24+
&& apt update \
2425
&& apt install --no-install-recommends -y \
2526
build-essential \
2627
python3-dev \
@@ -33,18 +34,13 @@ RUN apt update \
3334
rustc \
3435
cargo \
3536
sassc \
36-
&& ln -s /usr/bin/sassc /usr/bin/sass
37-
38-
# Need a newer node than what's in ubuntu
39-
RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
40-
&& apt-get update \
41-
&& apt-get install -y nodejs \
37+
nodejs \
38+
&& ln -s /usr/bin/sassc /usr/bin/sass \
4239
&& rm -rf /var/lib/apt/lists/* \
4340
&& corepack enable
4441

4542
# Build the necessary python wheels
4643
# Note that the --mount is a workaround for https://github.com/rust-lang/cargo/issues/8719
47-
#COPY . /home/wger/src
4844
WORKDIR /home/wger/src
4945

5046
COPY pyproject.toml /home/wger/src

extras/docker/production/Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
FROM wger/base:latest AS builder
1515
ARG DEBIAN_FRONTEND=noninteractive
1616

17-
RUN apt update \
17+
# Need a newer node than what's in ubuntu
18+
RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
19+
&& apt update \
1820
&& apt install --no-install-recommends -y \
1921
build-essential \
2022
python3-dev \
@@ -28,16 +30,12 @@ RUN apt update \
2830
sassc \
2931
cargo \
3032
unzip \
31-
&& rm -rf /var/lib/apt/lists/*
32-
33-
# Need a newer node than what's in ubuntu
34-
RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
35-
&& apt-get update \
36-
&& apt-get install -y nodejs \
33+
nodejs \
3734
&& rm -rf /var/lib/apt/lists/* \
3835
&& corepack enable \
3936
&& mkdir -p /root/src/wger/core/static
4037

38+
4139
#
4240
# Build the python wheels
4341
#

0 commit comments

Comments
 (0)