1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00

added centos/docker in travis

This commit is contained in:
eoli3n 2017-12-27 11:53:35 +01:00
parent de017220fd
commit c0bdb66c97
5 changed files with 63 additions and 2 deletions

@ -13,7 +13,10 @@ install:
- docker build -t archlinux/dotfiles .
- cd ../debian
- docker build -t debian/dotfiles .
- cd ../centos
- docker build -t centos/dotfiles .
script:
- docker run archlinux/dotfiles test.sh
- docker run debian/dotfiles test.sh
- docker run centos/dotfiles test.sh

38
docker/centos/Dockerfile Normal file

@ -0,0 +1,38 @@
FROM centos:7
# Locales keyboard
RUN sed -i 's/^\(override_install_langs.*\)$/#\1/' /etc/yum.conf \
&& yum -y -q reinstall glibc-common \
&& 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 git clone --recursive https://github.com/eoli3n/dotfiles
RUN cd /home/test/dotfiles; ./install.sh server | tee ansible.log
RUN echo -e "dockerpass" | chsh -s /bin/zsh
ADD test.sh .
ENTRYPOINT /usr/bin/zsh

20
docker/centos/README.md Normal file

@ -0,0 +1,20 @@
## User
Login : ``test``
Password : ``dockerpass``
## Store Docker files in /home
```
sudo cp -R /var/lib/docker /home/
sudo rm -Rf /var/lib/docker
sudo ln -s /home/docker /var/lib/docker
```
## Clean Docker files
```
sudo docker system prune
```
## Start Docker
```
sudo docker build -t archlinux-dotfiles .
```

2
docker/centos/test.sh Executable file

@ -0,0 +1,2 @@
#!/bin/bash
grep 'failed=0' ~/ansible.log

@ -1,8 +1,6 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"