Dockerfile 656 Bytes
Newer Older
1
FROM python:3-alpine
Izalia Mae's avatar
Izalia Mae committed
2
3

# install build deps for pycryptodome and other c-based python modules
4
5
RUN apk add alpine-sdk autoconf automake libtool gcc

Izalia Mae's avatar
Izalia Mae committed
6
7
# add env var to let the relay know it's in a container
ENV DOCKER_RUNNING=true
8

Izalia Mae's avatar
Izalia Mae committed
9
10
# setup various container properties
VOLUME ["/data"]
11
CMD ["python", "-m", "relay"]
Izalia Mae's avatar
Izalia Mae committed
12
13
14
15
16
EXPOSE 8080/tcp
WORKDIR /opt/activityrelay

# install and update important python modules
RUN pip3 install -U setuptools wheel pip
17

Izalia Mae's avatar
Izalia Mae committed
18
19
20
21
22
23
24
25
26
27
28
# only copy necessary files
COPY relay ./relay
COPY LICENSE .
COPY README.md .
COPY requirements.txt .
COPY setup.cfg .
COPY setup.py .
COPY .git ./.git

# install relay deps
RUN pip3 install -r requirements.txt