From 9a17fe740c961550ed1acede2af830058098ee49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 16 Sep 2024 02:56:11 +0200 Subject: [PATCH 1/2] 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/ --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a32eefd64..35b6f84d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 From 4a1615accb618fff90206eec60965e3c7d0cd258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 16 Sep 2024 16:11:58 +0200 Subject: [PATCH 2/2] Remove version attribute in docker-compose Using a recent version of Docker Compose, we were getting a warning: ``` docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion ``` This attribute is obsolete since Docker Compose 1.27, released in 2020, so most developers won't be affected by this change. Developers using really old versions of Docker Compose might have to upgrade their Docker Compose. --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 7d3087315..1ffa2db3f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3" services: # service configuration for our database database: