mirror of
https://github.com/eoli3n/dotfiles
synced 2024-09-22 03:40:41 +02:00
updated docker config
This commit is contained in:
parent
f39c64e8d0
commit
14a15efc8d
@ -6,14 +6,9 @@ services:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- dev
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- docker build -t archlinux/dotfiles -f docker/archlinux/Dockerfile .
|
- 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:
|
script:
|
||||||
- docker run archlinux/dotfiles dotfiles/docker/archlinux/test.sh
|
- 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
|
|
||||||
|
@ -28,20 +28,20 @@ ENV PATH="${PATH}:/usr/bin/core_perl"
|
|||||||
RUN pacman -S --noconfirm \
|
RUN pacman -S --noconfirm \
|
||||||
ansible \
|
ansible \
|
||||||
jshon \
|
jshon \
|
||||||
git
|
git \
|
||||||
|
fish
|
||||||
# Fix tmp dir perms
|
# Fix tmp dir perms
|
||||||
RUN chmod 1777 /tmp
|
RUN chmod 1777 /tmp
|
||||||
# Create test user
|
# Create test user
|
||||||
RUN useradd -m test \
|
RUN useradd -m user \
|
||||||
&& chown -R test:test /home/test \
|
&& chown -R user:user /home/user \
|
||||||
&& echo -e "test\ntest" | passwd test
|
&& echo -e "user\nuser" | passwd user
|
||||||
RUN echo "test ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
# User run
|
# User run
|
||||||
USER test
|
USER user
|
||||||
WORKDIR /home/test/
|
WORKDIR /home/user/
|
||||||
ENV LANG="fr_FR.UTF-8"
|
ENV LANG="fr_FR.UTF-8"
|
||||||
RUN mkdir dotfiles
|
RUN mkdir dotfiles
|
||||||
COPY . dotfiles/
|
COPY . dotfiles/
|
||||||
RUN cd dotfiles; ansible-playbook -i docker/archlinux/hosts install.yml | tee ansible.log
|
RUN cd dotfiles; ansible-playbook -i docker/archlinux/hosts install.yml | tee ansible.log
|
||||||
RUN echo -e "test" | chsh -s '/usr/bin/zsh'
|
ENTRYPOINT /bin/bash
|
||||||
ENTRYPOINT /usr/bin/zsh
|
|
||||||
|
@ -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
|
|
@ -1,12 +0,0 @@
|
|||||||
## Build and run Locally
|
|
||||||
```
|
|
||||||
git clone https://github.com/eoli3n/dotfiles
|
|
||||||
cd dotfiles
|
|
||||||
git checkout <master|dev>
|
|
||||||
sudo docker build -t centos/dotfiles -f docker/centos/Dockerfile .
|
|
||||||
sudo docker run -t centos/dotfiles
|
|
||||||
```
|
|
||||||
|
|
||||||
## User
|
|
||||||
Login : ``test``
|
|
||||||
Password : ``dockerpass``
|
|
@ -1,2 +0,0 @@
|
|||||||
[server]
|
|
||||||
localhost ansible_connection=local
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
grep 'failed=0' ~/dotfiles/ansible.log
|
|
@ -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
|
|
@ -1,12 +0,0 @@
|
|||||||
## Build and run Locally
|
|
||||||
```
|
|
||||||
git clone https://github.com/eoli3n/dotfiles
|
|
||||||
cd dotfiles
|
|
||||||
git checkout <master|dev>
|
|
||||||
sudo docker build -t debian/dotfiles -f docker/debian/Dockerfile .
|
|
||||||
sudo docker run -t debian/dotfiles
|
|
||||||
```
|
|
||||||
|
|
||||||
## User
|
|
||||||
Login : ``test``
|
|
||||||
Password : ``test``
|
|
@ -1,2 +0,0 @@
|
|||||||
[server]
|
|
||||||
localhost ansible_connection=local
|
|
@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
grep 'failed=0' ~/dotfiles/ansible.log
|
|
Loading…
Reference in New Issue
Block a user