-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.build
49 lines (41 loc) · 1005 Bytes
/
Dockerfile.build
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
ARG ALPINE_VERSION=0
FROM alpine:${ALPINE_VERSION}
ARG BUILD_USER
ENV BUILD_USER=${BUILD_USER}
ARG BUILD_USER_UID=1000
ENV BUILD_USER_UID=${BUILD_USER_UID}
RUN apk add --no-cache \
abuild \
apk-tools \
alpine-conf \
busybox \
curl \
fakeroot \
sudo \
squashfs-tools \
mkinitfs \
grub-efi \
mtools \
xorriso
# for python virtualenvs
RUN apk add --no-cache \
python3 \
py3-pip
# for home assistant
RUN apk add --no-cache \
git \
gcc \
g++ \
ffmpeg-dev \
linux-headers \
py3-netifaces \
python3-dev \
musl-dev
RUN adduser -u $BUILD_USER_UID -G users -s /bin/sh -D $BUILD_USER \
&& adduser $BUILD_USER abuild \
&& echo "$BUILD_USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wheel \
&& chmod 640 /etc/sudoers.d/wheel
# Without an `apk update` here, build of Raspberry Pi images will fail with
# `gzip: invalid magic` when running an `apk fetch` for `rbi_blobs`.
RUN apk update
USER ${BUILD_USER}:users