diff --git a/docker/Dockerfile b/docker/Dockerfile index 140e1d1..0717ad2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -171,6 +171,8 @@ RUN useradd -m -s /bin/bash pyros_user --uid $uid # 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 + +# cd /home/pyros_user/app WORKDIR /home/pyros_user/app # Switch from root to pyros_user @@ -181,6 +183,8 @@ USER pyros_user #RUN pip install --user numpy # Copy local host machine files to image +# Dockerfile contains this volume => ../..:/home/pyros_user/app +# Thus, this will copy PYROS_SOFT/* ==TO==> /home/pyros_user/app/ (the WORKDIR) COPY --chown=pyros_user:pyros_user . . # Copy some aliases RUN cp .bash_aliases .. @@ -192,9 +196,9 @@ ENV PATH "$PATH:/home/pyros_user/.local/bin" # Installing click on the image to prevent error on the first execution of the installation script -RUN python3 -m pip install --user click +RUN python3 -m pip install --user click -RUN python3 -m pip install --user setuptools==58 +RUN python3 -m pip install --user setuptools==58 # (EP 23/3/2022) Installing pip-tools for the management of all the requirements*.txt files (python dependencies packages) # NB : @@ -203,14 +207,14 @@ RUN python3 -m pip install --user setuptools==58 # - Unfortunatly, it is difficult to use with several requirements*.txt files as it is the case for this software : pyros + sphinx + guitastro... # - So we cannot yet use it completely and still have to use the traditional "pip install -r" anyway ... # - But we can at least use it to generate all the requirements*.txt files in a far better format -RUN python3 -m pip install --user pip-tools +RUN python3 -m pip install --user pip-tools # Installing packages required for Guitastro RUN pip-compile ./vendor/guitastro/install/requirements.in -RUN python3 -m pip install --user -r ./vendor/guitastro/install/requirements.txt +RUN python3 -m pip install --user -r ./vendor/guitastro/install/requirements.txt # Maybe unnecessary because same requirements as for pyros requirements_dev (?) #RUN pip install --user -r ./vendor/guitastro/install/requirements_dev.txt # Installing packages required for PyROS -RUN python3 -m pip install --user -r ./install/requirements.txt -RUN python3 -m pip install --user -r ./install/requirements_dev.txt +RUN python3 -m pip install --user -r ./install/requirements.txt +RUN python3 -m pip install --user -r ./install/requirements_dev.txt diff --git a/docker/PYROS_DOCKER_BUILD b/docker/PYROS_DOCKER_BUILD index d588fca..0db3bc3 100755 --- a/docker/PYROS_DOCKER_BUILD +++ b/docker/PYROS_DOCKER_BUILD @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Git clone guitastro +# # This could be done directly in the Dockerfile # but it is better to do it here because if it failed during the build # we would have to do all the build again... diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ad5b981..7f5a40f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -111,6 +111,7 @@ services: tty: true # stdin_open is the -i option in docker exec stdin_open: true + # Local PYROS_SOFT/ folder is linked to container /home/pyros_user/app folder volumes: - ../..:/home/pyros_user/app # tells which port of local machine can communicate with the docker image (host:container), host is your local machine -- libgit2 0.21.2