-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build multi-arch Docker Image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Login to Docker Hub | ||
# Only if we need to push an image | ||
if: ${{ github.event_name == 'release' && github.event.action == 'published' }} | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Setup for buildx | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
image: tonistiigi/binfmt:qemu-v6.0.0-12 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
version: v0.6.1 | ||
|
||
# Debugging information | ||
- name: Docker info | ||
run: docker info | ||
- name: Buildx inspect | ||
run: docker buildx inspect | ||
|
||
# Build and (optionally) push the image | ||
- name: Build image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
# Only push if we are publishing a release | ||
push: ${{ github.event_name == 'release' && github.event.action == 'published' }} | ||
# Use a 'temp' tag, that won't be pushed, for non-release builds | ||
tags: testcontainers/sshd:${{ github.event.release.tag_name || 'temp' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
FROM alpine:3.5 | ||
FROM alpine:3.16.0 | ||
RUN apk add --no-cache openssh && ssh-keygen -A && echo 'root:root' | chpasswd |