From eda3fbfb1f0ddf6164f8fe6b78073bf05d1cde2f Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 31 Mar 2021 22:10:49 +0200 Subject: [PATCH] Update build --- .goreleaser.yml | 2 +- Dockerfile | 8 ++++---- Makefile | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 125bbb324..e1b7b1ed7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,7 +12,7 @@ builds: flags: - -tags=release ldflags: - - -X github.com/andig/evcc/server.Version={{.Version}} -X github.com/andig/evcc/server.Commit={{.ShortCommit}} + - -X github.com/andig/evcc/server.Version={{.Version}} -X github.com/andig/evcc/server.Commit={{.ShortCommit}} -s -w env: - CGO_ENABLED=0 goos: diff --git a/Dockerfile b/Dockerfile index 874115e5b..ef087264c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,9 +46,9 @@ RUN make build # STEP 3 build a small image including module support -FROM alpine:3.12 +FROM alpine:3.13 -WORKDIR /evcc +WORKDIR /app ENV TZ=Europe/Berlin @@ -57,7 +57,7 @@ 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 docker/bin/* /evcc/ +COPY entrypoint.sh /app/ # UI and /api EXPOSE 7070/tcp @@ -68,5 +68,5 @@ EXPOSE 9522/udp HEALTHCHECK --interval=60s --start-period=60s --timeout=30s --retries=3 CMD [ "evcc", "health" ] -ENTRYPOINT [ "/evcc/entrypoint.sh" ] +ENTRYPOINT [ "/app/entrypoint.sh" ] CMD [ "evcc" ] diff --git a/Makefile b/Makefile index 95f048686..a4c2e00ee 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ SHA := $(shell test -d .git && git rev-parse --short HEAD) VERSION := $(if $(TAG_NAME),$(TAG_NAME),$(SHA)) BUILD_DATE := $(shell date -u '+%Y-%m-%d_%H:%M:%S') BUILD_TAGS := -tags=release -LD_FLAGS := -X github.com/andig/evcc/server.Version=$(VERSION) -X github.com/andig/evcc/server.Commit=$(SHA) +LD_FLAGS := -X github.com/andig/evcc/server.Version=$(VERSION) -X github.com/andig/evcc/server.Commit=$(SHA) -s -w BUILD_ARGS := -ldflags='$(LD_FLAGS)' # docker @@ -67,7 +67,7 @@ docker: publish-testing: @echo Version: $(VERSION) $(BUILD_DATE) seihon publish --dry-run=false --template docker/tmpl.Dockerfile --base-runtime-image alpine:$(ALPINE_VERSION) \ - --image-name $(DOCKER_IMAGE) -v "testing" --targets=arm.v6,amd64 + --image-name $(DOCKER_IMAGE) -v "testing" --targets=$(TARGETS) publish-latest: @echo Version: $(VERSION) $(BUILD_DATE)