1
0
Fork 0
mirror of https://github.com/eoli3n/dotfiles synced 2024-05-28 02:16:07 +02:00
eoli3n-dotfiles/docker/centos/Dockerfile
2018-05-14 10:55:21 +02:00

37 lines
861 B
Docker

FROM centos:7
# Locales keyboard
RUN echo 'LANG="fr_FR.UTF-8"' > /etc/locale.conf
ENV LANG fr_FR.UTF-8
# Debian Deps
RUN yum update -y && yum install -y \
sudo \
binutils \
util-linux \
fakeroot \
file \
python \
make \
gcc \
pkg-config \
perl \
gnupg2
ENV PATH="${PATH}:/usr/bin/core_perl"
# Project deps
RUN yum install -y \
ansible \
git
# Create test user
RUN useradd -m test \
&& chown -R test:test /home/test \
&& echo -e "dockerpass\ndockerpass" | passwd test
RUN echo "test ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# User run
USER test
WORKDIR /home/test/
ENV LANG="fr_FR.UTF-8"
RUN mkdir dotfiles
COPY . dotfiles/
RUN cd dotfiles; ansible-playbook -i docker/centos/hosts install.yml | tee ansible.log
RUN echo -e "dockerpass" | chsh -s /bin/zsh
ENTRYPOINT /usr/bin/zsh