mirror of
https://github.com/coder/coder.git
synced 2026-06-05 14:08:20 +00:00
570a1ffc2b
The base ubuntu image lands the user as root, but the terraform tempalte expected /home/coder to be used. This change adds a user with the same name as the Coder users username and allows them to sudo.
19 lines
349 B
Docker
19 lines
349 B
Docker
FROM ubuntu
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
curl \
|
|
git \
|
|
golang \
|
|
sudo \
|
|
vim \
|
|
wget \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ARG USER=coder
|
|
RUN useradd --groups sudo --no-create-home ${USER} \
|
|
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
|
|
&& chmod 0440 /etc/sudoers.d/${USER}
|
|
USER ${USER}
|
|
WORKDIR /home/${USER}
|