forked from balena-os/wifi-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
54 lines (36 loc) · 1.52 KB
/
Dockerfile.template
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
46
47
48
49
50
51
52
53
# Base-image for python on any machine using a template variable
FROM resin/raspberry-pi-python:3.6
# Enable systemd init system
ENV INITSYSTEM on
# -- Start of resin-wifi-connect section -- #
# Set the device type environment variable using Dockerfile templates
ENV DEVICE_TYPE=%%RESIN_MACHINE_NAME%%-debian
RUN apt-get update \
&& apt-get install -y dnsmasq wireless-tools \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
RUN curl https://api.github.com/repos/SidneyNiccolson/resin-wifi-connect/releases/latest \
| grep -hoP 'browser_download_url": "\K.*%%RESIN_ARCH%%\.tar\.gz' \
| xargs -n1 curl -Ls \
| tar -xvz -C /usr/src/app/
# -- End of resin-wifi-connect section -- #
# Copy start script into container
COPY scripts/start.sh .
# -- Start of astroplant-client section section -- #
COPY astroplant-kit /usr/src/app/astroplant-kit
COPY astroplant-peripheral-device-library /usr/src/app/astroplant-peripheral-device-library
# Use apt-get to install dependencies
RUN apt-get update && apt-get install -yq --no-install-recommends \
pigpio && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --upgrade pip
#pigpiod install
RUN pip install pigpio==1.40.post1
RUN pip install -r astroplant-kit/requirements.txt
RUN cd astroplant-kit && pip install -e .
RUN pip install -r astroplant-peripheral-device-library/requirements.txt
RUN cd astroplant-peripheral-device-library && pip install -e .
# -- End of astroplant-client section -- #
CMD ["bash", "start.sh"]