-
-
Notifications
You must be signed in to change notification settings - Fork 714
Expand file tree
/
Copy pathDockerfile.wifi-connect.j2
More file actions
50 lines (40 loc) · 1.38 KB
/
Dockerfile.wifi-connect.j2
File metadata and controls
50 lines (40 loc) · 1.38 KB
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
{% include 'Dockerfile.base.j2' %}
{% if disable_cache_mounts %}
RUN \
{% else %}
RUN --mount=type=cache,target=/var/cache/apt \
{% endif %}
apt-get -y install --no-install-recommends \
{% for dependency in apt_dependencies %}
{% if not loop.last %}
{{ dependency }} \
{% else %}
{{ dependency }}
{% endif %}
{% endfor %}
WORKDIR /usr/src/app
# @TODO: WiFi Connect 4.11.1 doesn't have a release for Raspberry Pi
# devices that has ARMv6 support. We should remove this once a
# new compatible release is available.
RUN if [[ ! -z "{{ archive_url }}" ]]; then \
curl -sL -o /tmp/wifi_connect.zip "{{ archive_url }}" && \
unzip -o /tmp/wifi_connect.zip -d /usr/src/app && \
rm /tmp/wifi_connect.zip; fi
COPY pyproject.toml uv.lock /tmp/uv-deps/
{% if disable_cache_mounts %}
RUN \
{% else %}
RUN --mount=type=cache,target=/root/.cache/uv \
{% endif %}
uv venv --system-site-packages /opt/venv && \
cd /tmp/uv-deps && \
VIRTUAL_ENV=/opt/venv uv sync --active --only-group wifi-connect --no-install-project --frozen
ENV PATH="/opt/venv/bin:$PATH"
COPY send_zmq_message.py ./
RUN touch /var/lib/misc/dnsmasq.leases
COPY bin/start_wifi_connect.sh ./
ENV DEVICE_TYPE={{ board }}
ENV GIT_HASH={{ git_hash }}
ENV GIT_SHORT_HASH={{ git_short_hash }}
ENV GIT_BRANCH={{ git_branch }}
CMD ["bash", "start_wifi_connect.sh"]