diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 000000000000..364d3a7302c7 --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,80 @@ +// docker buildx bake [target] --set [target].platform=linux/amd64 --load + +group "default" {targets = []} + +target "base" { + context = "/tmp/build" + platforms = ["linux/amd64", "linux/arm64"] + output = ["type=oci"] + pull = "always" +} + +target "monolith" { + inherits = ["base"] + // XXX probably not + matrix = { + dockerfiles = [ + "apps/meteor/.docker/Dockerfile", + "apps/meteor/.docker/Dockerfile.alpine", + "apps/meteor/.docker-mongo/Dockerfile" + ] + } + dockerfile = dockerfiles +} + +target "authorization-service" { + inherits = ["base"] + dockerfile = "ee/apps/authorization-service/Dockerfile" + args = { + SERVICE = "authorization-service" + } +} + +target "account-service" { + inherits = ["base"] + dockerfile = "ee/apps/account-service/Dockerfile" + args = { + SERVICE = "account-service" + } +} + +target "presence-service" { + inherits = ["base"] + dockerfile = "ee/apps/presence-service/Dockerfile" + args = { + SERVICE = "presence-service" + } +} + +target "ddp-streamer-service" { + inherits = ["base"] + dockerfile = "ee/apps/ddp-streamer-service/Dockerfile" + args = { + SERVICE = "ddp-streamer" + } +} + +target "stream-hub-service" { + inherits = ["base"] + dockerfile = "ee/apps/stream-hub-service/Dockerfile" + args = { + SERVICE = "stream-hub-service" + } +} + +target "queue-worker-service" { + inherits = ["base"] + dockerfile = "ee/apps/queue-worker/Dockerfile" + args = { + SERVICE = "queue-worker" + } +} + +target "omnichannel-transcript-service" { + inherits = ["base"] + dockerfile = "ee/apps/omnichannel-transcript/Dockerfile" + args = { + SERVICE = "omnichannel-transcript" + } +} + diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index efe10df17e23..e859772f007b 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -2,10 +2,8 @@ version: '3.8' services: rocketchat: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ${RC_DOCKERFILE} context: /tmp/build image: ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${RC_DOCKER_TAG} @@ -28,10 +26,8 @@ services: traefik.http.routers.rocketchat.rule: PathPrefix(`/`) authorization-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/authorization-service/Dockerfile context: . args: @@ -47,10 +43,8 @@ services: - nats account-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/account-service/Dockerfile context: . args: @@ -66,10 +60,8 @@ services: - nats presence-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/presence-service/Dockerfile context: . args: @@ -85,10 +77,8 @@ services: - nats ddp-streamer-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/ddp-streamer/Dockerfile context: . args: @@ -110,10 +100,8 @@ services: traefik.http.routers.ddp-streamer-service.rule: PathPrefix(`/websocket`) || PathPrefix(`/sockjs`) stream-hub-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/stream-hub-service/Dockerfile context: . args: @@ -129,10 +117,8 @@ services: - nats queue-worker-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/queue-worker/Dockerfile context: . args: @@ -148,10 +134,8 @@ services: - nats omnichannel-transcript-service: + platform: linux/amd64 build: - platforms: - - linux/amd64 - - linux/arm64 dockerfile: ee/apps/omnichannel-transcript/Dockerfile context: . args: