diff --git a/docker/Dockerfile b/docker/Dockerfile index 1e81d375c4..6c4e62eb31 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ ARG BASE_IMAGE=python:3.12-slim-bullseye # hadolint ignore=DL3006 -FROM ${BASE_IMAGE} as base +FROM ${BASE_IMAGE} AS base -FROM base as builder +FROM base AS builder # Set PATH to pickup virtual environment by default ENV PATH=/usr/local/venv/bin:"${PATH}" COPY . /code @@ -48,10 +48,11 @@ RUN adduser \ COPY --from=builder --chown=moby /usr/local/venv /usr/local/venv/ +# Does NOT define USER as ENV USER moby -ENV USER ${USER} -ENV HOME /home/moby +ENV USER=moby +ENV HOME=/home/moby WORKDIR ${HOME}/work # Use C.UTF-8 locale to avoid issues with ASCII encoding diff --git a/docker/gpu/Dockerfile b/docker/gpu/Dockerfile index 7c4a3ab3ae..288ef916f2 100644 --- a/docker/gpu/Dockerfile +++ b/docker/gpu/Dockerfile @@ -1,6 +1,6 @@ -FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04 as base +FROM nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04 AS base -FROM base as builder +FROM base AS builder # hadolint ignore=DL3015 RUN apt-get update -y && \ apt-get install -y \