summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorNikolaos Boutalas <nikolaos@boutalas.me>2023-08-07 10:45:42 +0300
committerNikolaos Boutalas <nikolaos@boutalas.me>2023-08-07 10:50:41 +0300
commite0187a235c761240dacb8fd765f9eab9d4e8404c (patch)
tree90c01c0e8789817bdb69cb929d4a39ae6d029ee3 /Dockerfile
Initialize project and introduce Dockerfile
I added a simple Dockerfile that builds an Ubuntu based container ready to be used with Ansible.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..2668fad
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,19 @@
+FROM ubuntu:latest
+
+RUN apt-get update && \
+ apt-get install -y ansible python3-apt
+
+RUN apt-get install -y sudo \
+ && 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"]