diff --git a/.travis.yml b/.travis.yml index e1965e1..78b84cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,14 +6,9 @@ services: branches: only: - master - - dev install: - docker build -t archlinux/dotfiles -f docker/archlinux/Dockerfile . - - docker build -t debian/dotfiles -f docker/debian/Dockerfile . - - docker build -t centos/dotfiles -f docker/centos/Dockerfile . script: - docker run archlinux/dotfiles dotfiles/docker/archlinux/test.sh - - docker run debian/dotfiles dotfiles/docker/debian/test.sh - - docker run centos/dotfiles dotfiles/docker/centos/test.sh diff --git a/docker/archlinux/Dockerfile b/docker/archlinux/Dockerfile index 785ee0f..76d258d 100644 --- a/docker/archlinux/Dockerfile +++ b/docker/archlinux/Dockerfile @@ -28,20 +28,20 @@ ENV PATH="${PATH}:/usr/bin/core_perl" RUN pacman -S --noconfirm \ ansible \ jshon \ - git + git \ + fish # Fix tmp dir perms RUN chmod 1777 /tmp # Create test user -RUN useradd -m test \ - && chown -R test:test /home/test \ - && echo -e "test\ntest" | passwd test -RUN echo "test ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers +RUN useradd -m user \ + && chown -R user:user /home/user \ + && echo -e "user\nuser" | passwd user +RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers # User run -USER test -WORKDIR /home/test/ +USER user +WORKDIR /home/user/ ENV LANG="fr_FR.UTF-8" RUN mkdir dotfiles COPY . dotfiles/ RUN cd dotfiles; ansible-playbook -i docker/archlinux/hosts install.yml | tee ansible.log -RUN echo -e "test" | chsh -s '/usr/bin/zsh' -ENTRYPOINT /usr/bin/zsh +ENTRYPOINT /bin/bash diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile deleted file mode 100644 index ded952c..0000000 --- a/docker/centos/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -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 diff --git a/docker/centos/README.md b/docker/centos/README.md deleted file mode 100644 index 21c9261..0000000 --- a/docker/centos/README.md +++ /dev/null @@ -1,12 +0,0 @@ -## Build and run Locally -``` -git clone https://github.com/eoli3n/dotfiles -cd dotfiles -git checkout -sudo docker build -t centos/dotfiles -f docker/centos/Dockerfile . -sudo docker run -t centos/dotfiles -``` - -## User -Login : ``test`` -Password : ``dockerpass`` diff --git a/docker/centos/hosts b/docker/centos/hosts deleted file mode 100644 index d2dced9..0000000 --- a/docker/centos/hosts +++ /dev/null @@ -1,2 +0,0 @@ -[server] -localhost ansible_connection=local diff --git a/docker/centos/test.sh b/docker/centos/test.sh deleted file mode 100755 index c3785af..0000000 --- a/docker/centos/test.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -grep 'failed=0' ~/dotfiles/ansible.log diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile deleted file mode 100644 index 23358ae..0000000 --- a/docker/debian/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM debian:stable -# Locales keyboard -RUN apt-get update && apt-get install -y locales \ - && 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 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 mkdir dotfiles -COPY . dotfiles/ -RUN cd dotfiles; ansible-playbook -i docker/debian/hosts install.yml | tee ansible.log -RUN sudo chsh -s '/usr/bin/zsh' test -ENTRYPOINT /usr/bin/zsh diff --git a/docker/debian/README.md b/docker/debian/README.md deleted file mode 100644 index 046a5ad..0000000 --- a/docker/debian/README.md +++ /dev/null @@ -1,12 +0,0 @@ -## Build and run Locally -``` -git clone https://github.com/eoli3n/dotfiles -cd dotfiles -git checkout -sudo docker build -t debian/dotfiles -f docker/debian/Dockerfile . -sudo docker run -t debian/dotfiles -``` - -## User -Login : ``test`` -Password : ``test`` diff --git a/docker/debian/hosts b/docker/debian/hosts deleted file mode 100644 index d2dced9..0000000 --- a/docker/debian/hosts +++ /dev/null @@ -1,2 +0,0 @@ -[server] -localhost ansible_connection=local diff --git a/docker/debian/test.sh b/docker/debian/test.sh deleted file mode 100755 index c3785af..0000000 --- a/docker/debian/test.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -grep 'failed=0' ~/dotfiles/ansible.log