Last active
January 28, 2019 15:34
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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