Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Mar 31, 2021
1 parent ad1ce28 commit eda3fbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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" ]
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eda3fbf

Please sign in to comment.