Remove jq dependency in docker image (#411)

This commit is contained in:
Carsten Thiele 2020-11-08 18:10:17 +01:00 • committed by GitHub
parent 9ac2cfb435
commit a56909fcd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 9 deletions

View file

@ -7,7 +7,7 @@ FROM golang:1.14-alpine as builder
# Install git + SSL ca certificates.
# Git is required for fetching the dependencies.
# Ca-certificates is required to call HTTPS endpoints.
RUN apk update && apk add --no-cache git jq ca-certificates tzdata alpine-sdk npm && update-ca-certificates
RUN apk update && apk add --no-cache git ca-certificates tzdata alpine-sdk npm && update-ca-certificates
WORKDIR /build
@ -34,9 +34,6 @@ ENV TZ=Europe/Berlin
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/evcc /usr/local/bin/evcc
COPY --from=builder /usr/bin/jq /usr/bin/
COPY --from=builder /usr/lib/libonig.so.5* /usr/lib/
COPY --from=builder /usr/lib/libjq.so.1* /usr/lib/
COPY docker/bin/* /evcc/

View file

@ -5,7 +5,7 @@ set -e
HASSIO_OPTIONSFILE=/data/options.json
if [ -f ${HASSIO_OPTIONSFILE} ]; then
CONFIG=$(jq -r .config_file ${HASSIO_OPTIONSFILE})
CONFIG=$(grep config_file ${HASSIO_OPTIONSFILE}| cut -d ':' -f 2 | sed s/[\"}]//g )
echo "Using config file: ${CONFIG}"
if [ ! -f ${CONFIG} ]; then

View file

@ -6,7 +6,7 @@ FROM golang:1.14-alpine as builder
# Install git + SSL ca certificates.
# Git is required for fetching the dependencies.
# Ca-certificates is required to call HTTPS endpoints.
RUN apk update && apk add --no-cache git jq ca-certificates tzdata alpine-sdk npm && update-ca-certificates
RUN apk update && apk add --no-cache git ca-certificates tzdata alpine-sdk npm && update-ca-certificates
WORKDIR /build
@ -30,9 +30,6 @@ ENV TZ=Europe/Berlin
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /build/evcc /usr/local/bin/evcc
COPY --from=builder /usr/bin/jq /usr/bin/
COPY --from=builder /usr/lib/libonig.so.5* /usr/lib/
COPY --from=builder /usr/lib/libjq.so.1* /usr/lib/
COPY docker/bin/* /evcc/