Skip to content

Commit

Permalink
Merge pull request #51 from virtUOS/container-pip-install
Browse files Browse the repository at this point in the history
Install binary in container
  • Loading branch information
tibroc authored Mar 25, 2024
2 parents b24ce7a + 0547eaa commit 96a71ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM python:3.12-slim
EXPOSE 8000

FROM python:3.12-slim as build
COPY . /occameracontrol
WORKDIR /occameracontrol

RUN pip install --no-cache-dir -r /occameracontrol/requirements.txt
FROM python:3.12-slim
EXPOSE 8000
RUN --mount=type=bind,from=build,source=/occameracontrol,target=/occameracontrol \
--mount=type=tmpfs,destination=/tmp \
cp -r /occameracontrol /tmp \
&& pip install --no-cache-dir /tmp/occameracontrol \
&& cp /occameracontrol/camera-control.yml /etc/camera-control.yml

USER nobody
ENTRYPOINT [ "python", "-m", "occameracontrol"]
ENTRYPOINT [ "opencast-camera-control" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ services:
ports:
- '8000:8000'
volumes:
- './your_config.yml:/occameracontrol/config.yml'
- './your_config.yml:/etc/camera-control.yml'
```

0 comments on commit 96a71ba

Please sign in to comment.