Skip to content

Commit

Permalink
Automatically detect platform in devspace yaml
Browse files Browse the repository at this point in the history
- Allow PLATFORM env to override during build and push to remote cluster
  • Loading branch information
madhavajay committed Feb 26, 2024
1 parent 7b104bd commit e344a35
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,31 @@ vars:
CONTAINER_REGISTRY: "docker.io"
NODE_NAME: "mynode"
VERSION: "0.8.5-beta.1"
PLATFORM: $(uname -m | grep -q 'arm64' && echo "arm64" || echo "amd64")

# This is a list of `images` that DevSpace can build for this project
# We recommend to skip image building during development (devspace dev) as much as possible
images:
backend:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_BACKEND}"
buildKit: {}
buildKit: { args: ["--platform", "linux/${PLATFORM}"] }
dockerfile: ./backend/backend.dockerfile
context: ../
tags:
- dev-${DEVSPACE_TIMESTAMP}
frontend:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_FRONTEND}"
buildKit:
args: ["--target", "grid-ui-production"]
args:
["--target", "grid-ui-production", "--platform", "linux/${PLATFORM}"]
dockerfile: ./frontend/frontend.dockerfile
target: "grid-ui-production"
context: ./frontend
tags:
- dev-${DEVSPACE_TIMESTAMP}
seaweedfs:
image: "${CONTAINER_REGISTRY}/${DOCKER_IMAGE_SEAWEEDFS}"
buildKit: {}
buildKit: { args: ["--platform", "linux/${PLATFORM}"] }
buildArgs:
SEAWEEDFS_VERSION: ${SEAWEEDFS_VERSION}
dockerfile: ./seaweedfs/seaweedfs.dockerfile
Expand Down

0 comments on commit e344a35

Please sign in to comment.