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

added debian/docker in travis

This commit is contained in:
eoli3n 2017-12-27 11:14:03 +01:00
parent 58b86f5357
commit b13198e490
4 changed files with 60 additions and 0 deletions

@ -11,6 +11,9 @@ branches:
install:
- cd docker/archlinux
- docker build -t archlinux/dotfiles .
- cd ../debian
- docker build -t debian/dotfiles .
script:
- docker run archlinux/dotfiles test.sh
- docker run debian/dotfiles test.sh

39
docker/debian/Dockerfile Normal file

@ -0,0 +1,39 @@
FROM debian:stable
# Locales keyboard
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.UTF-8
# Debian Deps
RUN apt-get update && apt-get 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 echo 'deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main' >> /etc/apt/sources.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
RUN apt-get update && apt-get install -y \
ansible \
git
# Create test user
RUN useradd -m test \
&& chown -R test:test /home/test \
&& echo "test\ntest" | 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 sudo chsh -s '/usr/bin/zsh' test
ADD test.sh .
ENTRYPOINT /usr/bin/zsh

16
docker/debian/README.md Normal file

@ -0,0 +1,16 @@
## 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/debian/test.sh Executable file

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