Skip to content

Commit 96a71ba

Browse files
authored
Merge pull request #51 from virtUOS/container-pip-install
Install binary in container
2 parents b24ce7a + 0547eaa commit 96a71ba

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Dockerfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM python:3.12-slim
2-
EXPOSE 8000
3-
1+
FROM python:3.12-slim as build
42
COPY . /occameracontrol
5-
WORKDIR /occameracontrol
63

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

912
USER nobody
10-
ENTRYPOINT [ "python", "-m", "occameracontrol"]
13+
ENTRYPOINT [ "opencast-camera-control" ]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ services:
8080
ports:
8181
- '8000:8000'
8282
volumes:
83-
- './your_config.yml:/occameracontrol/config.yml'
83+
- './your_config.yml:/etc/camera-control.yml'
8484
```

0 commit comments

Comments
 (0)