From acda512c0a4ab52b3bc7afd203be19eeba77be67 Mon Sep 17 00:00:00 2001 From: Igor Zibarev Date: Fri, 8 Dec 2023 12:57:44 +0200 Subject: [PATCH] Build multiarch images --- Dockerfile | 2 +- Makefile | 10 +++++++--- README.md | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf57f4e..55708f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN yarn install && yarn build # Building a backend. # -FROM golang:1.21-alpine AS backend +FROM --platform=linux/amd64 golang:1.21-alpine AS backend # Move to a working directory (/build). WORKDIR /build diff --git a/Makefile b/Makefile index 1db17f9..25447ed 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,11 @@ docker: asynqmon --redis-addr=host.docker.internal:6379 build-image: - docker build -t docker.io/platacard/asynqmon:$(or $(TAG),latest) . + docker build \ + -t docker.io/platacard/asynqmon:$(or $(TAG),latest) . -push-image: build-image - docker push docker.io/platacard/asynqmon:$(or $(TAG),latest) +push-image: + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --push \ + -t docker.io/platacard/asynqmon:$(or $(TAG),latest) . diff --git a/README.md b/README.md index dd17d4c..ab0825e 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ _Note_: Use `--redis-url` to specify address, db-number, and password with one f | Flag | Env | Description | Default | | --------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------- | | `--port`(int) | `PORT` | port number to use for web ui server | 8080 | -| `---redis-url`(string) | `REDIS_URL` | URL to redis or sentinel server. See [godoc](https://pkg.go.dev/github.com/platacard/asynq#ParseRedisURI) for supported format | "" | +| `--redis-url`(string) | `REDIS_URL` | URL to redis or sentinel server. See [godoc](https://pkg.go.dev/github.com/platacard/asynq#ParseRedisURI) for supported format | "" | | `--redis-addr`(string) | `REDIS_ADDR` | address of redis server to connect to | "127.0.0.1:6379" | | `--redis-db`(int) | `REDIS_DB` | redis database number | 0 | | `--redis-password`(string) | `REDIS_PASSWORD` | password to use when connecting to redis server | "" |