Commit 2be8242aace747f4fd9ea2da824ce38582b15414
1 parent
64fe9f0c
Exists in
dev
Ajout du shebang dans les scripts PYROS_DOCKER_ shell pour demarrage auto en bash
Showing
4 changed files
with
43 additions
and
2 deletions
Show diff stats
... | ... | @@ -0,0 +1,36 @@ |
1 | +FROM python:3.8 | |
2 | + | |
3 | +RUN apt-get update && apt-get install -y \ | |
4 | + default-mysql-client \ | |
5 | + git \ | |
6 | + nano \ | |
7 | + vim | |
8 | + | |
9 | +# Get IRAP self signed certificate | |
10 | +RUN echo | openssl s_client -connect gitlab.irap.omp.eu:443 -servername gitlab.irap.omp.eu 2>/dev/null | openssl x509 > /etc/ssl/certs/gitlab.irap.omp.eu.crt | |
11 | + | |
12 | + | |
13 | +# adding new user (pyros_user) and creating his home folder | |
14 | +RUN useradd --create-home --shell /bin/bash pyros_user | |
15 | + | |
16 | +# Create the work dir and set permissions as pyros_user | |
17 | +RUN mkdir -p /home/pyros_user/app/ && chown -R pyros_user:pyros_user /home/pyros_user/app | |
18 | +WORKDIR /home/pyros_user/app | |
19 | + | |
20 | +# switch from root to pyros_user | |
21 | +USER pyros_user | |
22 | + | |
23 | +RUN pip install --user --upgrade pip | |
24 | +RUN pip install --user wheel | |
25 | +RUN pip install --user numpy | |
26 | +# copy local host machine files to image | |
27 | +COPY --chown=pyros_user:pyros_user . . | |
28 | + | |
29 | +# adding local/bin to path to avoid pip warning | |
30 | +ENV PATH "$PATH:/home/pyros_user/.local/bin" | |
31 | + | |
32 | +# installing click on the image to prevent error on the first execution of the installation script | |
33 | +RUN pip install --user click | |
34 | + | |
35 | +# installing packages required for PyROS | |
36 | +RUN pip install --user -r ./install/requirements_django2.txt | |
0 | 37 | \ No newline at end of file | ... | ... |
docker/PYROS_DOCKER_BUILD.sh
docker/PYROS_DOCKER_START.sh
1 | +#!/usr/bin/env bash | |
2 | + | |
1 | 3 | # We need these variables for the build and when we launch the containers |
2 | 4 | # But then, we do not need them anymore. Anyway they are referenced in the docker-compose.yml but it does not find them in memory => makes a warning when using the containers... |
3 | 5 | export CURRENT_UID=$(id -u) |
... | ... | @@ -10,9 +12,9 @@ docker compose down --remove-orphans |
10 | 12 | echo |
11 | 13 | echo "Then START:" |
12 | 14 | # Take docker-compose.yml folder name ("docker") as containers group name in Docker Desktop by default |
13 | -#docker compose up -d | |
15 | +docker compose up -d | |
14 | 16 | # Change this group name with -p option |
15 | -docker compose -p pyros-app up -d | |
17 | +#docker compose -p pyros-app up -d | |
16 | 18 | |
17 | 19 | # See started containers |
18 | 20 | echo | ... | ... |
docker/PYROS_DOCKER_STOP.bat