mirror of
https://github.com/hassio-addons/addon-wireguard.git
synced 2025-05-04 10:51:23 +00:00
58 lines
1.7 KiB
Docker
Executable file
58 lines
1.7 KiB
Docker
Executable file
ARG BUILD_FROM=hassioaddons/base:5.0.3
|
|
# hadolint ignore=DL3006
|
|
FROM ${BUILD_FROM}
|
|
|
|
# Set shell
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
# Setup base
|
|
# hadolint ignore=DL3003
|
|
RUN \
|
|
apk add --no-cache --virtual .build-dependencies \
|
|
build-base=0.5-r1 \
|
|
git=2.22.2-r0 \
|
|
\
|
|
&& apk add --no-cache \
|
|
go@edge=1.13.4-r1 \
|
|
libqrencode=4.0.2-r0 \
|
|
openresolv=3.9.2-r0 \
|
|
wireguard-tools@edge=0.0.20191219-r0 \
|
|
\
|
|
&& git clone --branch "v0.0.20191012" --depth=1 \
|
|
"https://git.zx2c4.com/wireguard-go" /tmp/wireguard \
|
|
\
|
|
&& cd /tmp/wireguard \
|
|
&& make \
|
|
&& make install \
|
|
\
|
|
&& rm -f -r /tmp/* \
|
|
&& apk del --no-cache --purge \
|
|
.build-dependencies \
|
|
go
|
|
|
|
# Copy root filesystem
|
|
COPY rootfs /
|
|
|
|
# Build arguments
|
|
ARG BUILD_ARCH
|
|
ARG BUILD_DATE
|
|
ARG BUILD_REF
|
|
ARG BUILD_VERSION
|
|
|
|
# Labels
|
|
LABEL \
|
|
io.hass.name="WireGuard" \
|
|
io.hass.description="Fast, modern, secure VPN tunnel" \
|
|
io.hass.arch="${BUILD_ARCH}" \
|
|
io.hass.type="addon" \
|
|
io.hass.version=${BUILD_VERSION} \
|
|
maintainer="Franck Nijhof <frenck@addons.community>" \
|
|
org.label-schema.description="Fast, modern, secure VPN tunnel" \
|
|
org.label-schema.build-date=${BUILD_DATE} \
|
|
org.label-schema.name="WireGuard" \
|
|
org.label-schema.schema-version="1.0" \
|
|
org.label-schema.url="https://community.home-assistant.io/t/community-hass-io-add-on-wireguard/134662?u=frenck" \
|
|
org.label-schema.usage="https://github.com/hassio-addons/addon-wireguard/tree/master/README.md" \
|
|
org.label-schema.vcs-ref=${BUILD_REF} \
|
|
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-wireguard" \
|
|
org.label-schema.vendor="Community Hass.io Add-ons"
|