-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (28 loc) · 948 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
32
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:3.6
MAINTAINER Diogenes Santos de Jesus <[email protected]>
# Install python3
RUN apk update && \
apk add --no-cache python3 git && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
# Install newer certs and pycog3
RUN apk add ca-certificates wget && \
ln -s /usr/bin/python3 /usr/bin/python
RUN adduser -h /home/bundle -D bundle
USER root
RUN update-ca-certificates --fresh
WORKDIR /home/bundle
RUN mkdir -p /home/bundle/pi-bundle/pi/commands
COPY setup.py requirements.txt /home/bundle/pi-bundle/
COPY pi/ /home/bundle/pi-bundle/pi/
WORKDIR /home/bundle/pi-bundle
RUN pip3 install -r requirements.txt
RUN pip3 install .
RUN apk del git
RUN rm -rfv /home/bundle/pi-bundle/ \
/var/cache/apk/* \
/root/.cache
WORKDIR /home/bundle/
USER bundle