diff --git a/docker/Dockerfile b/docker/Dockerfile index a773326..3127da1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,15 +1,7 @@ -# Run this Docker file mounting the nomad certs folder in `/home/nomad-certs` -# and lenstcrypt certs in `/home/letsencrypt`: -# -# docker build -t ai4-papi . -# docker run -ti -v /home/ubuntu/nomad-certs:/home/nomad-certs -v /home/ubuntu/letsencrypt:/home/letsencrypt -p 443:443 ai4-papi & -# -# See `docker_refresh.sh` for more information. +# docker build -t ai4-papi -f docker/Dockerfile . FROM ubuntu:22.04 -ARG papi_branch=master - # Install Nomad # Updated commands: https://developer.hashicorp.com/nomad/tutorials/get-started/gs-install RUN apt-get update && \ @@ -39,14 +31,9 @@ ENV NOMAD_CLIENT_KEY=/home/nomad-certs/cli-key.pem ENV FORWARDED_ALLOW_IPS=172.16.44.228 # Install API -#FIXME: installing directly from Github with pip (`pip install git+https://github.com/`) -# breaks config (does not copy `etc` folder) -# We use the ADD command to force a cache rebuilt when the repo is updated -# see: https://stackoverflow.com/a/65762156 -WORKDIR /home -ADD "https://api.github.com/repos/AI4EOSC/ai4-papi/commits/${papi_branch}?per_page=1" latest_commit -RUN git clone -b ${papi_branch} https://github.com/AI4EOSC/ai4-papi -RUN pip3 install -e ai4-papi +WORKDIR /home/ai4-papi +COPY . . +RUN pip3 install -e . # Run the API EXPOSE 80