Skip to content

Instantly share code, notes, and snippets.

@rhysha
Forked from WuSiYu/Dockerfile
Last active January 31, 2022 16:51
Show Gist options
  • Select an option

  • Save rhysha/68dae23be2a30dac1898f99188eae986 to your computer and use it in GitHub Desktop.

Select an option

Save rhysha/68dae23be2a30dac1898f99188eae986 to your computer and use it in GitHub Desktop.
A "full" ubuntu-server development environment docker image
FROM ubuntu:latest
LABEL maintainer="rhysha <[email protected]>"
ENV DEV_USER=user
ENV UID=1000
ENV GID=1000
ENV DEF_PASSWD=password
ENV TZ=Asia/Shanghai
ENV LANG=en_US.UTF-8
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
yes | unminimize && \
apt install -y systemd sudo openssh-server bash-completion zsh git curl vim && \
addgroup --gid $GID $DEV_USER && \
adduser --uid $UID --gid $GID --gecos "" --disabled-password $DEV_USER && \
usermod -aG sudo $DEV_USER && \
echo "$DEV_USER:$DEF_PASSWD" | chpasswd && \
systemctl mask systemd-resolved.service && \
echo "LANG=$LANG" > /etc/default/locale && \
cp /usr/share/doc/util-linux/examples/securetty /etc/securetty
CMD ["systemd"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment