-
Notifications
You must be signed in to change notification settings - Fork 7
/
buildspec.yml
35 lines (25 loc) · 1.1 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs
- apt-get update && apt-get install bc -y
- apt-get install -y qemu-user-static
# Install AWS CLI
# - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# - unzip awscliv2.zip
# - ./aws/install
# - rm awscliv2.zip
# - rm -rf aws
# install buildx
- wget -nv https://github.com/docker/buildx/releases/download/v0.7.1/buildx-v0.7.1.linux-amd64
- chmod +x buildx-v0.7.1.linux-amd64
- mkdir -p ~/.docker/cli-plugins
- mv buildx-v0.7.1.linux-amd64 ~/.docker/cli-plugins/docker-buildx
- export DOCKER_CLI_EXPERIMENTAL=enabled
- export DOCKER_BUILDKIT=1
build:
commands:
- docker buildx create --name mybuilder --use --bootstrap
- docker buildx build --push --platform linux/amd64,linux/arm64 --tag public.ecr.aws/zinclabs/debug-ubuntu-base:latest .