Skip to content

Commit

Permalink
Fix Docker rule findings
Browse files Browse the repository at this point in the history
  • Loading branch information
noxone committed Sep 9, 2024
1 parent 557bda1 commit f942851
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ ARG APP_ENV=local
#**************************************
# build stages used by local build only
#**************************************
FROM gradle:8.10.0-jdk11 AS TEMP_BUILD_IMAGE
FROM gradle:8.10.0-jdk11 AS temp-build-image
WORKDIR /app
COPY . .

# Install Firefox
RUN echo 'Package: firefox' > /etc/apt/preferences.d/firefox-no-snap && \
echo 'Pin: origin "*.ubuntu.com"' >> /etc/apt/preferences.d/firefox-no-snap && \
echo 'Pin: origin "*.ubuntu.com"' >> /etc/apt/preferences.d/firefox-no-snap && \
echo 'Pin: origin "*.ubuntu.com"' >> /etc/apt/preferences.d/firefox-no-snap && \
echo 'Pin-Priority: -1' >> /etc/apt/preferences.d/firefox-no-snap && \
apt-get update && apt purge firefox &&\
Expand All @@ -37,7 +37,7 @@ WORKDIR /app
RUN apk update \
&& apk add lighttpd \
&& rm -rf /var/cache/apk/*
COPY --from=TEMP_BUILD_IMAGE /app/build/distributions /var/www/localhost/htdocs
COPY --from=temp-build-image /app/build/distributions /var/www/localhost/htdocs

# github action only
FROM alpine:3.20.3 AS github-postinstall
Expand All @@ -48,6 +48,6 @@ RUN apk update \
COPY build/distributions /var/www/localhost/htdocs

# final stage (maybe empty)
FROM ${APP_ENV}-postinstall as final
FROM ${APP_ENV}-postinstall AS final
EXPOSE 80
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]

0 comments on commit f942851

Please sign in to comment.