forked from cs3org/wopiserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwopiserver.Dockerfile
38 lines (31 loc) · 1.34 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
36
37
38
# 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.11-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 if [ '$BASEIMAGE' = 'python:3.10-slim-buster' ]; then \
apt -y install g++; \
else \
apk add g++; \
fi
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/* ./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"]