forked from boatd/boatd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 848 Bytes
/
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
FROM python:3-alpine
WORKDIR /build
COPY . ./
COPY ./boatd-config.yaml.example /opt/boatd/config/boatd-config.yaml
COPY ./example/basic_behaviour.py /opt/boatd/behaviours/
COPY ./example/basic_driver.py /opt/boatd/drivers/
COPY ./bin/boatd /usr/local/bin/
# Bind on all adapters so dockers bridge network works as expected
RUN sed -i.bak 's/127\.0\.0\.1/0\.0\.0\.0/' /opt/boatd/config/boatd-config.yaml && \
rm /opt/boatd/config/boatd-config.yaml.bak
RUN apk update && \
apk add git && \
pip3 install -r requirements.txt && \
python3 setup.py install && \
git clone https://github.com/boatd/python-boatd.git && \
cd python-boatd && \
python3 setup.py install && \
rm -rf /build
EXPOSE 2222
ENV PYTHONUNBUFFERED 1
ENV CONFIG /opt/boatd/config/boatd-config.yaml
ENTRYPOINT ["/bin/sh", "-c", "boatd ${CONFIG}"]