Remove vcn from Dockerfile (#3241)

This commit is contained in:
Joakim Sørensen 2021-10-19 10:08:53 +02:00 committed by GitHub
parent 7a6663ba80
commit 03f0a136ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 33 deletions

View File

@ -6,7 +6,6 @@ ENV \
SUPERVISOR_API=http://localhost
ARG BUILD_ARCH
ARG VCN_VERSION
WORKDIR /usr/src
# Install base
@ -19,34 +18,7 @@ RUN \
libffi \
libpulse \
musl \
openssl \
&& apk add --no-cache --virtual .build-dependencies \
build-base \
go \
\
&& git clone -b v${VCN_VERSION} --depth 1 \
https://github.com/codenotary/vcn \
&& cd vcn \
\
&& if [ "${BUILD_ARCH}" = "armhf" ]; then \
GOARM=6 GOARCH=arm go build -o vcn -ldflags="-s -w" ./cmd/vcn; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then \
GOARM=7 GOARCH=arm go build -o vcn -ldflags="-s -w" ./cmd/vcn; \
elif [ "${BUILD_ARCH}" = "aarch64" ]; then \
GOARCH=arm64 go build -o vcn -ldflags="-s -w" ./cmd/vcn; \
elif [ "${BUILD_ARCH}" = "i386" ]; then \
GOARCH=386 go build -o vcn -ldflags="-s -w" ./cmd/vcn; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then \
GOARCH=amd64 go build -o vcn -ldflags="-s -w" ./cmd/vcn; \
else \
exit 1; \
fi \
\
&& rm -rf /root/go /root/.cache \
&& mv vcn /usr/bin/vcn \
\
&& apk del .build-dependencies \
&& rm -rf /usr/src/vcn
openssl
# Install requirements
COPY requirements.txt .

View File

@ -8,9 +8,6 @@
"amd64": "ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.14",
"i386": "ghcr.io/home-assistant/i386-base-python:3.9-alpine3.14"
},
"args": {
"VCN_VERSION": "0.9.8"
},
"labels": {
"io.hass.type": "supervisor",
"org.opencontainers.image.title": "Home Assistant Supervisor",
@ -21,4 +18,4 @@
"org.opencontainers.image.documentation": "https://www.home-assistant.io/docs/",
"org.opencontainers.image.licenses": "Apache License 2.0"
}
}
}