Skip to content

Commit 182f371

Browse files
authored
Set HOME, so the user of this image can access Conan profiles (#11)
1 parent ffa5946 commit 182f371

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

docker/debian/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ EOF
120120

121121
# Switch to the non-root user.
122122
USER ${NONROOT_USER}
123-
WORKDIR /home/${NONROOT_USER}
123+
ENV HOME=/home/${NONROOT_USER}
124+
WORKDIR ${HOME}
124125

125126
# Create a default Conan profile.
126127
RUN <<EOF
@@ -190,7 +191,8 @@ EOF
190191

191192
# Switch to the non-root user.
192193
USER ${NONROOT_USER}
193-
WORKDIR /home/${NONROOT_USER}
194+
ENV HOME=/home/${NONROOT_USER}
195+
WORKDIR ${HOME}
194196

195197
# Create a default Conan profile.
196198
RUN <<EOF

docker/rhel/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ EOF
8383

8484
# Switch to the non-root user.
8585
USER ${NONROOT_USER}
86-
WORKDIR /home/${NONROOT_USER}
86+
ENV HOME=/home/${NONROOT_USER}
87+
WORKDIR ${HOME}
8788

8889
# Fix the Conan user home directory as it otherwise will point to the
8990
# /opt/app-root/src/.conan2 directory.
@@ -166,7 +167,8 @@ EOF
166167

167168
# Switch to the non-root user.
168169
USER ${NONROOT_USER}
169-
WORKDIR /home/${NONROOT_USER}
170+
ENV HOME=/home/${NONROOT_USER}
171+
WORKDIR ${HOME}
170172

171173
# Fix the Conan user home directory as it otherwise will point to the
172174
# /opt/app-root/src/.conan2 directory.

docker/tools-rippled/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ RUN pipx install --pip-args='--no-cache' clang-format==${CLANG_FORMAT_VERSION} &
5858

5959
# Switch to the non-root user.
6060
USER ${NONROOT_USER}
61-
WORKDIR /home/${NONROOT_USER}
61+
ENV HOME=/home/${NONROOT_USER}
62+
WORKDIR ${HOME}

docker/ubuntu/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ EOF
100100

101101
# Switch to the non-root user.
102102
USER ${NONROOT_USER}
103-
WORKDIR /home/${NONROOT_USER}
103+
ENV HOME=/home/${NONROOT_USER}
104+
WORKDIR ${HOME}
104105

105106
# Create a default Conan profile.
106107
RUN <<EOF
@@ -183,7 +184,8 @@ EOF
183184

184185
# Switch to the non-root user.
185186
USER ${NONROOT_USER}
186-
WORKDIR /home/${NONROOT_USER}
187+
ENV HOME=/home/${NONROOT_USER}
188+
WORKDIR ${HOME}
187189

188190
# Create a default Conan profile.
189191
RUN <<EOF

0 commit comments

Comments
 (0)