From bacab20f4a9b5b3374a3f15923edd102b9a4b24f Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 26 Nov 2019 22:22:55 -0800 Subject: Add Makefile target to build only amd64 Docker image --- Dockerfile | 2 +- Makefile | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 439ef8f..da33ff1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apk add --no-cache --update build-base git COPY . . RUN make linux-__MINIFLUX_ARCH__ VERSION=__MINIFLUX_VERSION__ -FROM __BASEIMAGE_ARCH__/alpine:3.10.1 +FROM __BASEIMAGE_ARCH__/alpine:3.10.3 EXPOSE 8080 ENV LISTEN_ADDR 0.0.0.0:8080 RUN apk --no-cache add ca-certificates tzdata diff --git a/Makefile b/Makefile index 4ffbfcf..8470a2a 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ export GO111MODULE=on lint \ integration-test \ clean-integration-test \ + docker-image \ docker-images \ docker-manifest @@ -118,6 +119,14 @@ clean-integration-test: @ rm miniflux-test @ psql -U postgres -c 'drop database if exists miniflux_test;' +docker-image: + cp Dockerfile Dockerfile.amd64 + sed -i.bak "s/__BASEIMAGE_ARCH__/amd64/" Dockerfile.amd64 + sed -i.bak "s/__MINIFLUX_VERSION__/$(VERSION)/" Dockerfile.amd64 + sed -i.bak "s/__MINIFLUX_ARCH__/amd64/" Dockerfile.amd64 + docker build --pull -f Dockerfile.amd64 -t $(DOCKER_IMAGE):$(VERSION) . + rm -f Dockerfile.amd64* + docker-images: for arch in amd64 arm32v6 arm32v7 arm64v8; do \ case $${arch} in \ -- cgit v1.2.3