From fb0e9715797323720c7e61febbe2d00d7bcd0151 Mon Sep 17 00:00:00 2001 From: Santiago Bartesaghi Date: Mon, 9 Dec 2024 11:25:43 -0300 Subject: [PATCH] Fix warnings (#918) --- Dockerfile | 26 +++++++++++++------------- Dockerfile.dev | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10aec5e3..f9e54ca5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,25 +2,25 @@ ARG RUBY_VERSION=3.3.5 ARG NODE_VERSION=22.7.0 # Use Node image so we can pull the binaries from here. -FROM node:$NODE_VERSION as node +FROM node:$NODE_VERSION AS node # Ruby build image. -FROM ruby:${RUBY_VERSION}-slim as base +FROM ruby:${RUBY_VERSION}-slim AS base # Setup environment variables. -ENV WORK_ROOT /src -ENV APP_HOME $WORK_ROOT/app -ENV LANG C.UTF-8 -ENV BUNDLE_PATH $APP_HOME/vendor/bundle +ENV WORK_ROOT=/src +ENV APP_HOME=$WORK_ROOT/app +ENV LANG=C.UTF-8 +ENV BUNDLE_PATH=$APP_HOME/vendor/bundle # Set prod environment to avoid installing dev dependencies -ENV BUNDLE_WITHOUT development:test -ENV BUNDLE_DEPLOYMENT 1 -ENV RAILS_ENV production -ENV NODE_ENV production +ENV BUNDLE_WITHOUT=development:test +ENV BUNDLE_DEPLOYMENT=1 +ENV RAILS_ENV=production +ENV NODE_ENV=production # Throw-away build stage to reduce size of final image -FROM base as builder +FROM base AS builder RUN apt-get update -qq && \ apt-get install -y build-essential libssl-dev libpq-dev git libsasl2-dev curl && \ @@ -76,8 +76,8 @@ COPY --from=builder $APP_HOME/vendor/ $APP_HOME/vendor/ RUN ln -s /usr/lib/*-linux-gnu/libjemalloc.so.2 /usr/lib/libjemalloc.so.2 # Deployment options -ENV RAILS_LOG_TO_STDOUT true -ENV RAILS_SERVE_STATIC_FILES true +ENV RAILS_LOG_TO_STDOUT=true +ENV RAILS_SERVE_STATIC_FILES=true ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 # Entrypoint prepares the database. diff --git a/Dockerfile.dev b/Dockerfile.dev index e7e4db14..a83a3055 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -2,7 +2,7 @@ ARG RUBY_VERSION=3.3.5 ARG NODE_VERSION=22.7.0 # Use Node image so we can pull the binaries from here. -FROM node:$NODE_VERSION as node +FROM node:$NODE_VERSION AS node # Ruby build image. FROM ruby:${RUBY_VERSION}-slim @@ -16,9 +16,9 @@ COPY --from=node /usr/local /usr/local COPY --from=node /opt /opt # Setup environment variables. -ENV WORK_ROOT /src -ENV APP_HOME $WORK_ROOT/app/ -ENV LANG C.UTF-8 +ENV WORK_ROOT=/src +ENV APP_HOME=$WORK_ROOT/app/ +ENV LANG=C.UTF-8 # Create app directory. RUN mkdir -p $APP_HOME