-
Notifications
You must be signed in to change notification settings - Fork 26
/
wopiserver.Dockerfile
35 lines (28 loc) · 1.33 KB
/
wopiserver.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Dockerfile for WOPI Server
#
# Build: make docker or docker-compose -f wopiserver.yaml build --build-arg VERSION=`git describe | sed 's/^v//'` BASEIMAGE=... wopiserver
ARG VERSION=latest
ARG BASEIMAGE=python:3.12.3-alpine
FROM $BASEIMAGE
LABEL maintainer="[email protected]" \
org.opencontainers.image.title="The ScienceMesh IOP WOPI server" \
org.opencontainers.image.version="$VERSION"
# prerequisites: we explicitly install g++ as it is required by grpcio but missing from its dependencies
WORKDIR /app
COPY requirements.txt .
RUN command -v apk && apk add curl g++ || true
RUN command -v apt && apt update && apt -y install curl g++ || true
RUN pip3 install --upgrade pip setuptools && \
pip3 install --no-cache-dir --upgrade -r requirements.txt
# install software
RUN mkdir -p /app/core /app/bridge /test /etc/wopi /var/log/wopi /var/wopi_local_storage
COPY ./src/*py ./tools/* /app/
COPY ./src/core/* /app/core/
COPY ./src/bridge/* /app/bridge/
RUN sed -i "s/WOPISERVERVERSION = 'git'/WOPISERVERVERSION = '$VERSION'/" /app/wopiserver.py && \
grep 'WOPISERVERVERSION =' /app/wopiserver.py
COPY wopiserver.conf /etc/wopi/wopiserver.defaults.conf
COPY test/*py test/*conf /test/
# add basic custom configuration; need to contextualize
COPY ./docker/etc/*secret ./docker/etc/wopiserver.conf /etc/wopi/
ENTRYPOINT ["/app/wopiserver.py"]