-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
ARG ALPINE_VERSION=edge | ||
ARG NEATVNC_VERSION="0.8.0-r0" | ||
# versions must correspond with APKBUILD | ||
ARG NEATVNC_VERSION="0.8.1-r0" | ||
ARG WAYVNC_VERSION="0.8.0-r0" | ||
FROM alpine:${ALPINE_VERSION} | ||
LABEL maintainer="Björn Busse <[email protected]>" | ||
|
@@ -15,6 +16,8 @@ ENV _APKBUILD="https://git.alpinelinux.org/aports/plain/community/neatvnc/APKBUI | |
|
||
# Add build requirements | ||
RUN echo $'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories \ | ||
# Add signing keys | ||
&& apk add -X https://nl.alpinelinux.org/alpine/edge/main -u alpine-keys --allow-untrusted \ | ||
&& apk update \ | ||
&& apk upgrade \ | ||
&& apk add alpine-sdk curl gnutls-dev | ||
|
@@ -27,9 +30,15 @@ RUN addgroup -S $USER && adduser -D $USER -G $USER -G abuild \ | |
USER $USER | ||
WORKDIR /home/$USER | ||
RUN curl -LO $_APKBUILD \ | ||
&& abuild-keygen -a -n \ | ||
&& abuild checksum \ | ||
&& abuild-keygen -a -n | ||
|
||
USER root | ||
RUN cp /home/$USER/.abuild/*.rsa.pub /etc/apk/keys/ | ||
|
||
USER $USER | ||
RUN abuild checksum \ | ||
&& abuild -r \ | ||
&& ls packages/home/$(uname -m)/ \ | ||
&& cp /home/$USER/packages/home/$(uname -m)/$PKG_NEATVNC_DEV . \ | ||
&& cp /home/$USER/packages/home/$(uname -m)/$PKG_NEATVNC . | ||
|
||
|
@@ -44,8 +53,10 @@ ENV _APKBUILD="https://git.alpinelinux.org/aports/plain/community/wayvnc/APKBUIL | |
|
||
# Add build requirements | ||
RUN echo $'http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories \ | ||
# Add signing keys | ||
&& apk add -X https://nl.alpinelinux.org/alpine/edge/main -u alpine-keys --allow-untrusted \ | ||
&& apk update \ | ||
&& apk add alpine-sdk | ||
&& apk add alpine-sdk curl | ||
|
||
# Add build user | ||
RUN addgroup -S $USER && adduser -D $USER -G $USER -G abuild \ | ||
|
@@ -54,12 +65,14 @@ RUN addgroup -S $USER && adduser -D $USER -G $USER -G abuild \ | |
# Copy | ||
USER $USER | ||
WORKDIR /home/$USER | ||
COPY --from=0 /etc/apk/keys /etc/apk/keys | ||
COPY --from=0 /home/$USER/$PKG_NEATVNC . | ||
COPY --from=0 /home/$USER/$PKG_NEATVNC_DEV . | ||
|
||
USER root | ||
# Install copied dependencies | ||
RUN apk add --allow-untrusted $PKG_NEATVNC $PKG_NEATVNC_DEV | ||
RUN apk update - allow-untrusted && \ | ||
apk add $PKG_NEATVNC $PKG_NEATVNC_DEV | ||
|
||
ARG WAYVNC_VERSION | ||
ENV PKG_WAYVNC="wayvnc-${WAYVNC_VERSION}.apk" | ||
|
@@ -73,9 +86,15 @@ RUN curl -LO $_APKBUILD \ | |
&& awk '!/version.patch/' APKBUILD > APKBUILD_ \ | ||
&& rm APKBUILD \ | ||
&& mv APKBUILD_ APKBUILD \ | ||
&& abuild-keygen -a -n \ | ||
&& abuild checksum \ | ||
&& abuild-keygen -a -n | ||
|
||
USER root | ||
RUN cp /home/$USER/.abuild/*.rsa.pub /etc/apk/keys/ | ||
|
||
USER $USER | ||
RUN abuild checksum \ | ||
&& abuild -r \ | ||
&& ls packages/home/$(uname -m)/ \ | ||
&& cp /home/$USER/packages/home/$(uname -m)/$PKG_WAYVNC . | ||
|
||
COPY entrypoint.sh / | ||
|