Files
2024-01-24 04:57:49 +00:00

25 lines
600 B
Docker

FROM ubuntu
RUN apt-get update \
&& apt-get install -y \
curl \
git \
sudo \
vim \
nano \
wget \
jq \
&& rm -rf /var/lib/apt/lists/*
ARG USER=coder
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
RUN cd ~
RUN wget "https://dl.google.com/go/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz"
RUN tar -C /usr/local -xzf *.tar.gz
RUN echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile
RUN rm *.linux-amd64.tar.gz
USER ${USER}
WORKDIR /home/${USER}