diff options
-rw-r--r-- | Dockerfile.fedora | 19 | ||||
-rw-r--r-- | Dockerfile.ubuntu (renamed from Dockerfile) | 0 | ||||
-rw-r--r-- | README.md | 5 |
3 files changed, 22 insertions, 2 deletions
diff --git a/Dockerfile.fedora b/Dockerfile.fedora new file mode 100644 index 0000000..b0781cd --- /dev/null +++ b/Dockerfile.fedora @@ -0,0 +1,19 @@ +FROM fedora:latest + +RUN dnf update -y && \ + dnf install -y ansible + +RUN dnf install -y passwd \ + && useradd -m -s /bin/bash admin \ + && echo "admin ALL=(ALL) ALL" >> /etc/sudoers \ + && passwd -d root + +RUN echo 'admin:admin' | chpasswd + +USER admin +WORKDIR /home/admin + +COPY --chown=admin . init +WORKDIR init + +CMD ["/bin/bash"] diff --git a/Dockerfile b/Dockerfile.ubuntu index 2668fad..2668fad 100644 --- a/Dockerfile +++ b/Dockerfile.ubuntu @@ -2,12 +2,13 @@ ## Development -In order to test this, you can use *Docker* and build a simple Ubuntu container +In order to test this, you can use *Docker* and build a simple Linux container ```bash git clone git@github.com:nikolaosboutalas/init.git cd init - docker build . -t ansible && docker run --rm -it ansible + # Build a docker container with the specified distribution + docker build . -t ansible -f Dockerfile.<distribution> && docker run --rm -it ansible # Inside the new running container ./setup.sh ``` |