Skip to content

Commit 0e76758

Browse files
authored
Revert "Move nginx installation into another build step (#897)" (#899)
This reverts commit d963389. This broke certain assumptions like the `/etc/nginx` directory exists.
1 parent 12153f7 commit 0e76758

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

image/base/Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ FROM builder AS imagemagick_builder
1717
ADD install-imagemagick /tmp/install-imagemagick
1818
RUN /tmp/install-imagemagick
1919

20-
FROM builder AS nginx_builder
21-
# From https://nginx.org/en/pgp_keys.html
22-
ADD nginx_public_keys.key /tmp/nginx_public_keys.key
23-
ADD install-nginx /tmp/install-nginx
24-
RUN gpg --import /tmp/nginx_public_keys.key &&\
25-
rm /tmp/nginx_public_keys.key &&\
26-
/tmp/install-nginx
27-
2820
FROM discourse/ruby:3.3.6-${DEBIAN_RELEASE}-slim AS discourse_dependencies
2921

3022
ARG DEBIAN_RELEASE
@@ -99,8 +91,6 @@ RUN sed -i "s/^# $LANG/$LANG/" /etc/locale.gen; \
9991
RUN --mount=type=tmpfs,target=/root/.npm \
10092
npm install -g terser uglify-js pnpm
10193

102-
COPY --from=nginx_builder /usr/sbin/nginx /usr/sbin
103-
10494
# Copy binary and configuration files for magick
10595
COPY --from=imagemagick_builder /usr/local/bin/magick /usr/local/bin/magick
10696
COPY --from=imagemagick_builder /usr/local/etc/ImageMagick-7 /usr/local/etc/ImageMagick-7
@@ -123,6 +113,14 @@ RUN ln -s /usr/local/bin/magick /usr/local/bin/animate &&\
123113
ADD install-jemalloc /tmp/install-jemalloc
124114
RUN /tmp/install-jemalloc
125115

116+
# From https://nginx.org/en/pgp_keys.html
117+
ADD nginx_public_keys.key /tmp/nginx_public_keys.key
118+
ADD install-nginx /tmp/install-nginx
119+
120+
RUN gpg --import /tmp/nginx_public_keys.key &&\
121+
rm /tmp/nginx_public_keys.key &&\
122+
/tmp/install-nginx
123+
126124
ADD install-redis /tmp/install-redis
127125
RUN /tmp/install-redis
128126

0 commit comments

Comments
 (0)