Skip to content

Instantly share code, notes, and snippets.

@ehrktia
Created May 30, 2019 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehrktia/08527e17aff1d08df47fbb6305cba74a to your computer and use it in GitHub Desktop.
Save ehrktia/08527e17aff1d08df47fbb6305cba74a to your computer and use it in GitHub Desktop.
DockerFile -Skeleton
FROM ubuntu:latest
ARG USER_NAME="ehrktia"
ARG USER_PASSWORD="p@$$w0d"
ENV USER_NAME $USER_NAME
ENV USER_PASSWORD $USER_PASSWORD
ENV CONTAINER_IMAGE_VER=v1.0.0
RUN echo $USER_NAME
RUN echo $USER_PASSWORD
RUN echo $CONTAINER_IMAGE_VER
# install the tooks i wish to use
RUN apt-get update && \
apt-get install -y sudo \
curl \
git-core \
gnupg \
locales \
zsh \
wget \
nano \
fonts-powerline \
tmux\
golang-go\
# set up locale
&& locale-gen en_GB.UTF-8 \
# add a user (--disabled-password: the user won't be able to use the account until the password is set)
&& adduser --quiet --disabled-password --shell /bin/zsh --home /home/$USER_NAME --gecos "User" $USER_NAME \
# update the password
&& echo "${USER_NAME}:${USER_PASSWORD}" | chpasswd && usermod -aG sudo $USER_NAME
# the user we're applying this too (otherwise it most likely install for root)
USER $USER_NAME
# terminal colors with xterm
ENV TERM xterm
# set the zsh theme
ENV ZSH_THEME robbyrussell
# run the installation script
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
# start zsh
CMD [ "zsh" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment