File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 32
32
env :
33
33
VERSION : ${{ matrix.postgres }}-${{ matrix.postgis }}
34
34
VARIANT : ${{ matrix.variant }}
35
+ PLATFORMS : linux/amd64,linux/arm64,linux/arm/v7,linux/386
35
36
36
37
steps :
37
38
- name : Checkout source
Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ IMAGE_NAME ?= postgis
58
58
DOCKER =docker
59
59
DOCKERHUB_DESC_IMG =peterevans/dockerhub-description:latest
60
60
61
+ # choice between buildx and build depending on the PLATFORMS variable
62
+ ifdef PLATFORMS
63
+ BUILD := buildx build --platform $(PLATFORMS )
64
+ else
65
+ BUILD := build
66
+ endif
67
+
61
68
GIT =git
62
69
OFFIMG_LOCAL_CLONE =$(HOME ) /official-images
63
70
OFFIMG_REPO_URL =https://github.com/docker-library/official-images.git
@@ -76,12 +83,12 @@ update:
76
83
define build-version
77
84
build-$1:
78
85
ifeq ($(do_default ) ,true)
79
- $(DOCKER) build --pull -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1) $1
86
+ $(DOCKER) $(BUILD) --pull -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1) $1
80
87
$(DOCKER) images $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1)
81
88
endif
82
89
ifeq ($(do_alpine ) ,true)
83
90
ifneq ("$(wildcard $1/alpine) ","")
84
- $(DOCKER) build --pull -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1)-alpine $1/alpine
91
+ $(DOCKER) $(BUILD) --pull -t $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1)-alpine $1/alpine
85
92
$(DOCKER) images $(REPO_NAME)/$(IMAGE_NAME):$(shell echo $1)-alpine
86
93
endif
87
94
endif
Original file line number Diff line number Diff line change @@ -193,6 +193,21 @@ This Docker-PostGIS project [is part of the PostGIS group](https://postgis.net/d
193
193
* If you have a major change in mind, we kindly ask you to start a discussion about it first.
194
194
* After making changes to the templates, please run the ` ./update.sh ` script.
195
195
196
+ ## Building Docker Images
197
+
198
+ To build the all Docker images on your local machine, run:
199
+
200
+ ``` sh
201
+ make build
202
+ ```
203
+
204
+ To build for a different platform, install ` docker buildx ` and run:
205
+
206
+ ``` sh
207
+ export PLATFORMS=" linux/arm64,linux/amd64"
208
+ make build
209
+ ```
210
+
196
211
## Code of Conduct
197
212
198
213
see: https://postgis.net/community/conduct/
You can’t perform that action at this time.
0 commit comments