Blame view

Dockerfile 661 Bytes
5357999a   Alexis Koralewski   add Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 . .