From 6dc3765f6baf2702505e94e6c3ba0104afba01b7 Mon Sep 17 00:00:00 2001
From: clifennel
Date: Tue, 15 Sep 2026 21:28:51 -0700
Subject: [PATCH] [readme] Fix a Docker warning from using Docker installation
instructions
Fix a LegacyKeyValueFormat warning when building a Docker image using the 'Installing In Docker' instructions.
The warning fixed is: `LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format`
See: [LegacyKeyValueFormat](https://docs.docker.com/reference/build-checks/legacy-key-value-format/)
Co-authored-by: clifennel
Co-authored-by: Jordan Harband
---
Dockerfile | 6 +++---
README.md | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 97ff98cc..763ebc6d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,14 +15,14 @@ LABEL version="latest"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Prevent dialog during apt install
-ENV DEBIAN_FRONTEND noninteractive
+ENV DEBIAN_FRONTEND=noninteractive
# ShellCheck version
ENV SHELLCHECK_VERSION=0.7.0
# Pick a Ubuntu apt mirror site for better speed
# ref: https://launchpad.net/ubuntu/+archivemirrors
-ENV UBUNTU_APT_SITE ubuntu.cs.utah.edu
+ENV UBUNTU_APT_SITE=ubuntu.cs.utah.edu
# Replace origin apt package site with the mirror site
RUN sed -E -i "s/([a-z]+.)?archive.ubuntu.com/$UBUNTU_APT_SITE/g" /etc/apt/sources.list
@@ -92,7 +92,7 @@ RUN echo 'nvm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER nvm
# Create a script file sourced by both interactive and non-interactive bash shells
-ENV BASH_ENV /home/nvm/.bash_env
+ENV BASH_ENV=/home/nvm/.bash_env
RUN touch "$BASH_ENV"
RUN echo '. "$BASH_ENV"' >> "$HOME/.bashrc"
diff --git a/README.md b/README.md
index 954ec336..e9b4ff93 100644
--- a/README.md
+++ b/README.md
@@ -148,7 +148,7 @@ When invoking bash as a non-interactive shell, like in a [Docker](https://www.do
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Create a script file sourced by both interactive and non-interactive bash shells
-ENV BASH_ENV "${HOME}/.bash_env"
+ENV BASH_ENV="${HOME:-/root}/.bash_env"
RUN touch "${BASH_ENV}"
RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
@@ -174,7 +174,7 @@ RUN apt update && apt install curl -y
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash
# set env
-ENV NVM_DIR=/root/.nvm
+ENV NVM_DIR="${HOME:-/root}/.nvm"
# install node
RUN bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"