Skip to content

Instantly share code, notes, and snippets.

@ceres-c
Last active January 28, 2019 15:34
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 ceres-c/04f1e8462ede3d041aaf67c9d3a07fce to your computer and use it in GitHub Desktop.
Save ceres-c/04f1e8462ede3d041aaf67c9d3a07fce to your computer and use it in GitHub Desktop.
Dockerfile to create a welcoming environment on top of base/devel arch image
FROM base/devel:latest
MAINTAINER federico@ceres-c.it
# update system
RUN \
pacman -Syyu --noconfirm
# install basic dependencies
RUN \
pacman -S --noconfirm \
git \
tmux \
asp \
zsh \
pacman-contrib
# add password to root
RUN \
echo "root:root" | chpasswd
# add unprivileged user
RUN \
useradd -m user && \
echo "user:user" | chpasswd
# modify sudoers file to allow user to perform root operations
# WARNING This might be unsafe!
RUN \
echo "user ALL=(ALL) ALL" >> /etc/sudoers
# modify makepkg.conf to allow parallel compilation
RUN \
echo 'MAKEFLAGS="-j6"' >> /etc/makepkg.conf
# use /opt/dev as working directory
WORKDIR /home/user/
ENV EDITOR nano
# download oh-my-zsh
RUN \
export ZSH="/home/user/.oh-my-zsh" && \
curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | zsh || true
COPY zshrc /home/user/.zshrc
# set zsh as default shell and user
CMD ["/usr/bin/zsh"]
USER user
export ZSH=/home/user/.oh-my-zsh
export SHELL=/usr/bin/zsh
plugins=(git history-substring-search)
ZSH_THEME=pygmalion
source $ZSH/oh-my-zsh.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment