refactor(docker): drop Dockerfile.local
There are two Dockerfiles in the hafnium repo.
In the past, one was used to configure the CI environment.
Presently, the CI environment has its own docker image.
The docker in the repository to hafnium should be
for deveveloper utility only.
Reconciling both into a single file.
Change-Id: Ib5091ce297b77cdb4e8da3726eff800c5217fac7
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
index 0295c42..9cb2948 100644
--- a/build/docker/Dockerfile
+++ b/build/docker/Dockerfile
@@ -34,3 +34,18 @@
python3-pip `# for hftest.py` \
strace `# for strace_open.sh` \
&& pip3 install --break-system-packages fdt && rm -rf /var/lib/apt/lists/*
+
+ARG LOCAL_UID=1000
+ARG LOCAL_GID=1000
+
+RUN addgroup \
+ --gid "${LOCAL_GID}" \
+ hafnium \
+ && adduser \
+ -disabled-password \
+ -gecos "" \
+ --uid "${LOCAL_UID}" \
+ --shell "/bin/bash" \
+ --ingroup hafnium \
+ hafnium
+USER hafnium
diff --git a/build/docker/common.inc b/build/docker/common.inc
index 805aa3a..e15d8a3 100644
--- a/build/docker/common.inc
+++ b/build/docker/common.inc
@@ -4,10 +4,10 @@
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/BSD-3-Clause.
-CONTAINER_TAG="eu.gcr.io/hafnium-build/hafnium_ci"
+CONTAINER_TAG="hafnium_dev"
if [[ ! -v DOCKER ]]
then
DOCKER="$(which docker)" \
|| (echo "ERROR: Could not find Docker binary" 1>&2; exit 1)
-fi
\ No newline at end of file
+fi
diff --git a/build/run_in_container.sh b/build/run_in_container.sh
index bab31f6..24b026a 100755
--- a/build/run_in_container.sh
+++ b/build/run_in_container.sh
@@ -31,7 +31,7 @@
--build-arg LOCAL_UID="$(id -u)" \
--build-arg LOCAL_GID="$(id -g)" \
--iidfile="${IID_FILE}" \
- -f "${SCRIPT_DIR}/docker/Dockerfile.local" \
+ -f "${SCRIPT_DIR}/docker/Dockerfile" \
"${SCRIPT_DIR}/docker"
IMAGE_ID="$(cat ${IID_FILE})"