1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-23 15:32:01 +01:00
eoli3n-dotfiles/docker/centos/Dockerfile

37 lines
861 B
Docker
Raw Normal View History

2017-12-27 11:53:35 +01:00
FROM centos:7
# Locales keyboard
2018-05-14 10:55:21 +02:00
RUN echo 'LANG="fr_FR.UTF-8"' > /etc/locale.conf
2017-12-27 11:53:35 +01:00
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"
2017-12-27 13:16:29 +01:00
RUN mkdir dotfiles
COPY . dotfiles/
RUN cd dotfiles; ansible-playbook -i docker/centos/hosts install.yml | tee ansible.log
2017-12-27 11:53:35 +01:00
RUN echo -e "dockerpass" | chsh -s /bin/zsh
ENTRYPOINT /usr/bin/zsh