Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to all porter bundles to build docker images for amd64 platform from arm64 machines locally #3827

Merged
merged 11 commits into from
Jan 23, 2024
1 change: 1 addition & 0 deletions .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ignored:
# sometimes pinned versions are removed from the package source so we decided to ignore this rule.
- DL3008
- DL3018
- DL3029
10 changes: 9 additions & 1 deletion devops/scripts/bundle_runtime_image_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ if [ -n "${CI_CACHE_ACR_NAME:-}" ]; then
docker_cache+=("--cache-from" "${CI_CACHE_ACR_NAME}${acr_domain_suffix}/${IMAGE_NAME_PREFIX}/${image_name}:${version}")
fi

docker build --build-arg BUILDKIT_INLINE_CACHE=1 \
ARCHITECTURE=$(docker info --format "{{ .Architecture }}" )
m1p1h marked this conversation as resolved.
Show resolved Hide resolved

if [ "${ARCHITECTURE}" == "aarch64" ]; then
DOCKER_BUILD_COMMAND="docker buildx build --platform linux/amd64"
else
DOCKER_BUILD_COMMAND="docker build"
fi

${DOCKER_BUILD_COMMAND} --build-arg BUILDKIT_INLINE_CACHE=1 \
-t "${FULL_IMAGE_NAME_PREFIX}/${image_name}:${version}" \
"${docker_cache[@]}" -f "${docker_file}" "${docker_context}"

2 changes: 1 addition & 1 deletion templates/shared_services/admin-vm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/airlock_notifier/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/certs/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM python:3.8-slim-bullseye
FROM --platform=linux/amd64 python:3.8-slim-bullseye

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/cyclecloud/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/databricks-auth/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/firewall/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/azureml/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/databricks/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/guacamole/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/innereye/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/mlflow/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/mysql/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/ohdsi/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/airlock-import-review/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/unrestricted/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Loading