Skip to content

Commit

Permalink
fix(Dockerfile): install FOCA from local context (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Kanitz <alexander.kanitz@unibas.ch>
  • Loading branch information
anuragxxd and uniqueg committed Feb 18, 2021
1 parent 110e6cc commit fb62b36
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ ENV PACKAGES openssl git build-essential python3-dev curl jq
RUN apt-get update && \
apt-get install -y --no-install-recommends ${PACKAGES} && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app

# Install Python dependencies
WORKDIR /app
COPY ./requirements.txt .
COPY requirements.txt setup.py README.md ./
RUN pip install \
--no-warn-script-location \
--prefix="/install" \
-r requirements.txt && \
pip install \
--no-warn-script-location \
--prefix="/install" \
https://github.com/elixir-cloud-aai/foca/archive/dev.zip
--no-warn-script-location \
--prefix="/install" \
-r requirements.txt

# Install FOCA
COPY setup.py README.md ./
COPY foca/ ./foca/
RUN pip install . \
--no-warn-script-location \
--prefix="/install"

# Final image
FROM base
Expand Down
16 changes: 16 additions & 0 deletions examples/petstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,22 @@ of the following:
* [Dockerfile][app-dockerfile]
* [Docker Compose configuration][app-docker-compose]

### Modifying FOCA

In case you want to change FOCA itself and want the code changes to be
reflected in the Petstore app, you will need to manually rebuild the FOCA
container image like so:

```bash
docker build -t elixircloud/foca:latest . # execute in the FOCA root directory
```

Then re-build and start the Petstore app as described before:

```bash
docker-compose up --build -d # execute in _this_ directory
```

[app-config]: config.yaml
[app-controllers]: controllers.py
[app-dockerfile]: Dockerfile
Expand Down

0 comments on commit fb62b36

Please sign in to comment.