Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
zirain committed Jul 29, 2024
1 parent e943ce1 commit 2ab3313
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 124 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/code-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Code Check

on:
push:
branches:
- "master"
# paths:
# - 'k8s/kind/**'

permissions:
contents: read

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
# enable modules that needed by Istio Dual Stack
- run: make lint

test:
name: test
runs-on: ubuntu-latest
needs: lint
steps:
- run: make test

build:
name: build
runs-on: ubuntu-latest
needs: test
steps:
- run: make build

docker:
name: docker
runs-on: ubuntu-latest
needs: build
env:
HUB: ghcr.io/istio-ecosystem
steps:
- run: make docker
125 changes: 1 addition & 124 deletions tools/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
# Unlike standard Dockerfiles, Istio builds artifacts outside of docker and then copies them to a temp folder;
# This folder is then passed as the docker context. This avoids complex .dockerignore or large context loads.

# Example image config
example:
- name: helloworld # Name of the image. Will end up pushed to <HUB>/helloworld:<TAG>
dockerfile: helloworld/Dockerfile.proxyv2
files:
# Include a static file
# Inside the Dockerfile, this is referenced by the base name (README.md), not the full name.
- samples/README.md
targets:
# Build a file with make, then include as a static file
- ${TARGET_OUT_LINUX}/helloworld

images:

# Base images
Expand All @@ -26,120 +14,9 @@ images:
base: true

# Production images
- name: proxyv2
dockerfile: pilot/docker/Dockerfile.proxyv2
files:
- tools/packaging/common/envoy_bootstrap.json
- tools/packaging/common/gcp_envoy_bootstrap.json
- ${TARGET_OUT_LINUX}/${RELEASE_MODE}/${SIDECAR}
targets:
- ${TARGET_OUT_LINUX}/pilot-agent
- name: pilot
dockerfile: pilot/docker/Dockerfile.pilot
files:
- tools/packaging/common/envoy_bootstrap.json
- tools/packaging/common/gcp_envoy_bootstrap.json
targets:
- ${TARGET_OUT_LINUX}/pilot-discovery

- name: istioctl
dockerfile: istioctl/docker/Dockerfile.istioctl
targets:
- ${TARGET_OUT_LINUX}/istioctl

- name: operator
dockerfile: operator/docker/Dockerfile.operator
files:
- manifests
targets:
- ${TARGET_OUT_LINUX}/operator

- name: install-cni
dockerfile: cni/deployments/kubernetes/Dockerfile.install-cni
targets:
- ${TARGET_OUT_LINUX}/istio-cni
- ${TARGET_OUT_LINUX}/install-cni

- name: ztunnel
dockerfile: pilot/docker/Dockerfile.ztunnel
files:
- ${TARGET_OUT_LINUX}/ztunnel # TODO "${RELEASE_MODE}" to allow separate debug builds

# Test images
- name: app
dockerfile: pkg/test/echo/docker/Dockerfile.app
files:
- tests/testdata/certs
targets:
- ${TARGET_OUT_LINUX}/client
- ${TARGET_OUT_LINUX}/server

# Sample authz server
- name: ext-authz
dockerfile: samples/extauthz/docker/Dockerfile
targets:
- ${TARGET_OUT_LINUX}/extauthz

# TODO(https://github.com/istio/istio/issues/38224)
- name: app_sidecar_rockylinux_9
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar_centos_8
files:
- tools/packaging/common/envoy_bootstrap.json
- tests/testdata/certs
- pkg/test/echo/docker/echo-start.sh
- pkg/test/echo/docker/sudoers
targets:
- ${TARGET_OUT_LINUX}/release/istio-sidecar.rpm
- ${TARGET_OUT_LINUX}/client
- ${TARGET_OUT_LINUX}/server
- name: app_sidecar_debian_12
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar
files:
- tools/packaging/common/envoy_bootstrap.json
- tests/testdata/certs
- pkg/test/echo/docker/echo-start.sh
- pkg/test/echo/docker/sudoers
targets:
- ${TARGET_OUT_LINUX}/release/istio-sidecar.deb
- ${TARGET_OUT_LINUX}/client
- ${TARGET_OUT_LINUX}/server
emulationRequired: true
- name: app_sidecar_ubuntu_noble
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar
files:
- tools/packaging/common/envoy_bootstrap.json
- tests/testdata/certs
- pkg/test/echo/docker/echo-start.sh
- pkg/test/echo/docker/sudoers
targets:
- ${TARGET_OUT_LINUX}/release/istio-sidecar.deb
- ${TARGET_OUT_LINUX}/client
- ${TARGET_OUT_LINUX}/server
emulationRequired: true
- name: app_sidecar_ubuntu_bionic
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar
files:
- tools/packaging/common/envoy_bootstrap.json
- tests/testdata/certs
- pkg/test/echo/docker/echo-start.sh
- pkg/test/echo/docker/sudoers
targets:
- ${TARGET_OUT_LINUX}/release/istio-sidecar.deb
- ${TARGET_OUT_LINUX}/client
- ${TARGET_OUT_LINUX}/server
emulationRequired: true

# Test base images
- name: app_sidecar_base_debian_12 # latest debian
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar_base
base: true
- name: app_sidecar_base_ubuntu_noble # newest ubuntu
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar_base
base: true
- name: app_sidecar_base_ubuntu_bionic # oldest supported ubuntu
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar_base
base: true
# TODO(https://github.com/istio/istio/issues/38224)
- name: app_sidecar_base_rockylinux_9 # newest RHEL-based
dockerfile: pkg/test/echo/docker/Dockerfile.app_sidecar_base_centos
base: true
- ${TARGET_OUT_LINUX}/operator

0 comments on commit 2ab3313

Please sign in to comment.