pabla1322 commited on
Commit
cd1bf8c
Β·
verified Β·
1 Parent(s): e5de808

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -91,7 +91,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
91
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
92
 
93
  # ── Create ubuntu user ───────────────────────────────────────────────────────
94
- RUN useradd -m -s /bin/bash -u 1000 ubuntu \
 
 
95
  && echo "ubuntu:ubuntu" | chpasswd \
96
  && echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
97
  && mkdir -p /tmp/runtime-ubuntu \
 
91
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
92
 
93
  # ── Create ubuntu user ───────────────────────────────────────────────────────
94
+ RUN if ! id -u ubuntu >/dev/null 2>&1; then \
95
+ useradd -m -s /bin/bash -u 1000 ubuntu; \
96
+ fi \
97
  && echo "ubuntu:ubuntu" | chpasswd \
98
  && echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
99
  && mkdir -p /tmp/runtime-ubuntu \