From 5357999a429d5f5feef901202208765cb5c52955 Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Wed, 10 Mar 2021 16:13:12 +0100 Subject: [PATCH] add Dockerfile --- Dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+), 0 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b02d36b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.6.9 + +RUN apt-get update && apt-get install -y \ + default-mysql-client +RUN pip install --upgrade pip +# installing click on the image to prevent error on the first execution of the installation script +RUN pip install click + +# adding new user (pyros_user) and creating his home folder +RUN useradd --create-home --shell /bin/bash pyros_user + +# Create the work dir and set permissions as pyros_user +RUN mkdir -p /home/pyros_user/app/ && chown -R pyros_user:pyros_user /home/pyros_user/app +WORKDIR /home/pyros_user/app + +# switch from root to pyros_user +USER pyros_user + +# copy local host machine files to image +COPY --chown=pyros_user:pyros_user . . \ No newline at end of file -- libgit2 0.21.2