From 418d6336cab476b44528647f724f364bc66ee0ba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 12 Aug 2024 11:44:09 +0200 Subject: [PATCH] Use ENV key=value in Dockerfiles --- Dockerfile | 8 ++++---- base-image/Dockerfile | 4 ++-- base-image/Dockerfile2 | 4 ++-- base-image/Dockerfile3 | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5297dfd..847604a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,11 +15,11 @@ ARG host_gid=1001 ARG BUILD_NEW_TEMPLATE # Set up a local mirror -ENV LOCAL_MIRROR /source_mirror/sources/$version +ENV LOCAL_MIRROR=/source_mirror/sources/$version RUN mkdir -p $LOCAL_MIRROR # Add user "geniux" to sudoers. Then, the user can install Linux packages in the container. -ENV USER_NAME geniux +ENV USER_NAME=geniux RUN echo "${USER_NAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${USER_NAME} && \ chmod 0440 /etc/sudoers.d/${USER_NAME} @@ -46,8 +46,8 @@ RUN sed -i -r 's/ulimit \-Hn/ulimit \-n/g' /etc/init.d/docker # By default, docker runs as root. However, Yocto builds should not be run as # root, but as a normal user. Hence, we switch to the newly created user geniux. USER $USER_NAME -ENV BUILD_INPUT_DIR /home/$USER_NAME/yocto/input -ENV BUILD_OUTPUT_DIR /home/$USER_NAME/yocto/output +ENV BUILD_INPUT_DIR=/home/$USER_NAME/yocto/input +ENV BUILD_OUTPUT_DIR=/home/$USER_NAME/yocto/output RUN mkdir -p $BUILD_INPUT_DIR $BUILD_OUTPUT_DIR RUN sudo usermod -aG docker $USER_NAME && newgrp docker diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 9ccb4fe..7046895 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -118,6 +118,6 @@ RUN which dash &> /dev/null && (\ # Set the locale to en_US.UTF-8, because the Yocto build fails without any locale set. RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 diff --git a/base-image/Dockerfile2 b/base-image/Dockerfile2 index f970599..1dae3a7 100644 --- a/base-image/Dockerfile2 +++ b/base-image/Dockerfile2 @@ -117,6 +117,6 @@ RUN which dash &> /dev/null && (\ # Set the locale to en_US.UTF-8, because the Yocto build fails without any locale set. RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 diff --git a/base-image/Dockerfile3 b/base-image/Dockerfile3 index 2b557a0..730517a 100644 --- a/base-image/Dockerfile3 +++ b/base-image/Dockerfile3 @@ -116,6 +116,6 @@ RUN which dash &> /dev/null && (\ # Set the locale to en_US.UTF-8, because the Yocto build fails without any locale set. RUN locale-gen en_US.UTF-8 && update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8