Correctly declare environment variables in Dockerfile

We were getting warnings in our CI:

> Legacy key/value format with whitespace separator should not be used
> LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy
> "ENV key value" format

So we're updating the code as mentioned in the Docker documentation [1]

[1] https://docs.docker.com/reference/build-checks/legacy-key-value-format/
This commit is contained in:
Javi Martín
2024-09-16 02:56:11 +02:00
parent a8ea917c10
commit 9a17fe740c

View File

@@ -1,6 +1,6 @@
FROM ruby:3.2.5-bullseye
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install essential Linux packages
RUN apt-get update -qq \
@@ -29,7 +29,7 @@ RUN echo 'Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bi
RUN chmod 0440 /etc/sudoers.d/secure_path
# Define where our application will live inside the image
ENV RAILS_ROOT /var/www/consul
ENV RAILS_ROOT=/var/www/consul
# Create application home. App server will need the pids dir so just create everything in one shot
RUN mkdir -p $RAILS_ROOT/tmp/pids