forked from bitovi/bitops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (37 loc) · 1.2 KB
/
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
39
40
41
42
43
44
45
## Using alpine fails on awscli install
FROM python:3.8.6-alpine
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache bash
RUN apk update
RUN apk add \
libsodium-dev \
wget \
unzip \
git \
jq \
curl \
rsync \
openssh
# install glibc compatibility for alpine
ENV GLIBC_VER=2.31-r0
RUN mkdir -p /opt/bitops
RUN mkdir -p /opt/bitops-local-plugins
WORKDIR /opt/bitops
COPY scripts/ ./scripts
COPY bitops.config.yaml .
COPY bitops.schema.yaml .
COPY requirements.txt .
RUN pip3 install -r requirements.txt
# temporarily set the working dir to `/opt/bitops-local-plugins`
# to copy local plugins from a custom bitops repo into the container
# at build time to allow installing dependencies
ONBUILD WORKDIR /opt/bitops-local-plugins
# optionally copy all local plugins to the `/opt/bitops-local-plugins`
# directory within the built container
# See Docker workaround for making `plugins` dir optional: https://stackoverflow.com/a/46801962
ONBUILD COPY bitops.config.yaml plugins* .
ONBUILD WORKDIR /opt/bitops
ONBUILD COPY bitops.config.yaml .
ONBUILD RUN python3 scripts/main.py install
ENTRYPOINT ["python3", "/opt/bitops/scripts/main.py", "deploy"]