diff --git a/compose/caching/Dockerfile b/compose/caching/Dockerfile index b5717393c..6d3fd0758 100644 --- a/compose/caching/Dockerfile +++ b/compose/caching/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:1.24 +FROM nginx:stable-alpine #COPY ./src/caching/nginx.conf /etc/nginx/nginx.conf diff --git a/compose/caching/entrypoint b/compose/caching/entrypoint index 96491fe43..c8e54f446 100644 --- a/compose/caching/entrypoint +++ b/compose/caching/entrypoint @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh echo "Updating the proxy_pass in the nginx config based on the DRIVEBC_IMAGE_API_BASE_URL variable in the django configmap" diff --git a/compose/frontend/Dockerfile b/compose/frontend/Dockerfile index 952783eb2..585c2c903 100644 --- a/compose/frontend/Dockerfile +++ b/compose/frontend/Dockerfile @@ -19,7 +19,7 @@ EXPOSE 3000 ARG DEBUG_BUILD=false # Add debugging tools into builds if enabled -RUN if [ $DEBUG_BUILD = true ]; then \ +RUN if [ ${DEBUG_BUILD} = true ]; then \ apt update && apt-get install -y jq vim procps less; \ fi diff --git a/compose/frontend/StaticBuild b/compose/frontend/StaticBuild index b4b0b531a..07b2e281e 100644 --- a/compose/frontend/StaticBuild +++ b/compose/frontend/StaticBuild @@ -18,30 +18,9 @@ RUN chown node:root /app/node_modules # home is /, so node can't create a cache dir ENV HOME /home/node -ARG API_HOST -ENV REACT_APP_API_HOST=${API_HOST} -ARG BASE_MAP -ENV REACT_APP_BASE_MAP=${BASE_MAP} -ARG MAP_STYLE -ENV REACT_APP_MAP_STYLE=${MAP_STYLE} -ARG HIGHWAY_LAYER -ENV REACT_APP_HIGHWAY_LAYER=${HIGHWAY_LAYER} -ARG OPEN511_LAYER -ENV REACT_APP_OPEN511_LAYER=${OPEN511_LAYER} -ARG REPLAY_THE_DAY -ENV REACT_APP_REPLAY_THE_DAY=${REPLAY_THE_DAY} -ARG ROUTE_PLANNER -ENV REACT_APP_ROUTE_PLANNER=${ROUTE_PLANNER} -ARG ROUTE_PLANNER_KEY -ENV REACT_APP_ROUTE_PLANNER_KEY=${ROUTE_PLANNER_KEY} -ARG GEOCODER_HOST -ENV REACT_APP_GEOCODER_HOST=${GEOCODER_HOST} -ARG GEOCODER_API_AUTH_KEY -ENV REACT_APP_GEOCODER_API_AUTH_KEY=${GEOCODER_API_AUTH_KEY} - RUN npm run openshift_build -FROM nginx +FROM nginx:stable-alpine EXPOSE 3000 @@ -55,8 +34,8 @@ RUN chmod -R 777 /run /var/log/nginx /var/cache/nginx /usr/share/nginx/html/stat ARG DEBUG_BUILD=false # Add debugging tools into builds if enabled -RUN if [ $DEBUG_BUILD = true ]; then \ - apt update && apt-get install -y jq vim procps less; \ +RUN if [ ${DEBUG_BUILD} = true ]; then \ + apk update && apk add --no-cache jq vim procps less; \ fi COPY ./compose/frontend/entrypoint /docker-entrypoint.d/add_client_env.sh diff --git a/compose/frontend/entrypoint b/compose/frontend/entrypoint index 3ec764019..56ffa671c 100644 --- a/compose/frontend/entrypoint +++ b/compose/frontend/entrypoint @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh MAIN=`find /usr/share/nginx/html/static/js/main.*.js` echo -e "\nwindow.BASE_MAP='${REACT_APP_BASE_MAP}';" >> $MAIN