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

Add a Windows platform native image (WCOW) #40

Closed
wants to merge 35 commits into from
Closed
Changes from 4 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
55c6dcd
Add a Windows platform native image (WCOW)
gesellix Jul 30, 2022
86b1cc1
Revert to an older docker module
gesellix Jul 31, 2022
14b5825
Publish multi-arch images including Windows
gesellix Jul 31, 2022
13ce990
Bump Golang to 1.19
gesellix Aug 7, 2022
54947b0
Fix Windows platform build
gesellix Aug 8, 2022
fa2f720
add workflow_dispatch trigger to ease debugging
gesellix Aug 8, 2022
b11ece3
linux/s390x builds currently fail with tls issues
gesellix Aug 8, 2022
1ee680f
try to fix linux/s390x
gesellix Aug 8, 2022
20825a4
add a hint about potential tls issues for linux/s390x build
gesellix Aug 8, 2022
8667d98
chore
gesellix Aug 9, 2022
cc4ce01
Try to create images based on :ltsc2019 instead of :ltsc2022
gesellix Aug 17, 2022
9d8ad21
wip
gesellix Aug 18, 2022
a13904e
wip
gesellix Aug 18, 2022
13bf159
chore
gesellix Aug 18, 2022
68a489a
BASE -> WINBASE
gesellix Aug 19, 2022
77a526b
chore: simplify
mdelapenya Dec 1, 2022
5f86485
Merge branch 'main' into wcow
mdelapenya Dec 1, 2022
01e5548
chore: bring back go commands into the GH action
mdelapenya Dec 1, 2022
3938fff
chore: add logs to each section of the script
mdelapenya Dec 1, 2022
4b6ff3b
chore: standardize shell variables
mdelapenya Dec 1, 2022
5c3ef56
chore: reduce windows OSs
mdelapenya Dec 2, 2022
057d0b2
chore: add a label with the base image name
mdelapenya Dec 2, 2022
d59c833
chore: separate Windows container Dockerfile
mdelapenya Dec 2, 2022
422bef6
chore: do not run tests while packaging
mdelapenya Dec 2, 2022
08458a2
chore: simplify logic extracting vars to env vars
mdelapenya Dec 2, 2022
95dfe01
chore: remove publish workflow, as it's already managed by the build one
mdelapenya Dec 2, 2022
3e70928
fic: keep GH check for the build
mdelapenya Dec 2, 2022
cf94a38
chore: update windows example
mdelapenya Dec 2, 2022
4e9cfaa
chore: remove useless comments
mdelapenya Dec 2, 2022
0ec7863
chore: remove default value for scratch
mdelapenya Dec 2, 2022
8e7e12f
chore: remove comment
mdelapenya Dec 2, 2022
c42df84
chore: add a job that actually runs the created images
mdelapenya Dec 9, 2022
ef0c628
chore: always push the docker images, as we want to test snapshots
mdelapenya Dec 9, 2022
b1b4dfe
fix: always login to Docker Hub
mdelapenya Dec 9, 2022
d154bfc
chore: do not access Docker Hub on PRs
mdelapenya Dec 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches: [ main ]
pull_request:

env:
RYUK_VERSION: ${{ github.event.release.tag_name || github.sha }}
IS_RELEASE: ${{ (github.event_name == 'release' && github.event.action == 'published' && 'yes') || 'no' }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -33,7 +37,6 @@ jobs:
run: go test -v ./...

- 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@v2
with:
Expand All @@ -57,8 +60,28 @@ jobs:
# see https://github.com/testcontainers/moby-ryuk/pull/26
# and https://github.com/testcontainers/moby-ryuk/pull/40
- name: Cross Build for Linux and Windows
env:
RYUK_VERSION: ${{ github.event.release.tag_name || github.sha }}
IS_RELEASE: ${{ (github.event_name == 'release' && github.event.action == 'published' && 'yes') || 'no' }}
run: |
./build-multiarch.sh testcontainers/ryuk:${RYUK_VERSION} ${IS_RELEASE}

run-images:
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
needs: build
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022]

runs-on: ${{ matrix.os }}

steps:
- name: Pull Ryuk
run: docker pull testcontainers/ryuk:${RYUK_VERSION}

- name: Run Ryuk on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: docker run -v /var/run/docker.sock:/var/run/docker.sock testcontainers/ryuk:${RYUK_VERSION}

- name: Run Ryuk on Windows
if: ${{ matrix.os == 'windows-2022' }}
run: docker run -v //./pipe/docker_engine://./pipe/docker_engine testcontainers/ryuk:${RYUK_VERSION}
continue-on-error: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this line still required?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably we need to change it slightly, but we would like to keep something like this to test the built image. Due to the complexity and amount of combinations an error sneaked in. The linux/amd64 and windows/amd64 contained the ARM binary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I also think that the checks are required and make sense. I only asked for the "continue on error" line, which is at the very end of the workflow and doesn't have any effect (?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. continue-on-error is not necessary. We will adjust it with the update that fixes the binaries. Unfortunately, for Windows more changes are necessary due to: actions/runner-images#6688.