Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Open
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Use a package of configuration called an orb.
orbs:
# Declare a dependency on the welcome-orb
welcome: circleci/welcome-orb@0.4.1
# Orchestrate or schedule a set of jobs
workflows:
# Name the workflow "welcome"
welcome:
# Run the welcome/run job in its own container
jobs:
- welcome/run
76 changes: 76 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Docker

on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*

# Run tests for any PRs.
pull_request:

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: image

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile
fi

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin

- name: Push image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME

# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')

# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')

# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest

echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION

docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Building Docker Doodles
-----------------------
[![Build status](https://ci.appveyor.com/api/projects/status/tqtf7w82x6pd0d8g/branch/master?svg=true)](https://ci.appveyor.com/project/dslzuha/doodle/branch/master)

Building can be done with the original `docker build`, or with the new *BuildKit* application. The new
experimental 'buildx' command, which is in nightly builds as well as in the Docker Engine 19.03 release,
Expand All @@ -10,7 +11,7 @@ cross platform.

To build for your own platform with the original docker build command, use:

`cd <doodle> && docker build -t <username>/doodle:<doodle> ./`
`cd cheers2019 && docker build -t dslzuha/doodle:cheers2019 ./`

To build cross platform, use the `Dockerfile.cross` file, either with *BuildKit* directly, or with *buildx*.
With buildx, you'll first need to create a cross platform `builder` instance with:
Expand All @@ -20,7 +21,7 @@ With buildx, you'll first need to create a cross platform `builder` instance wit
You only need to create one builder instance, and should not need to create new ones with subsequent
builds. To create and push the multi-arch image to Docker Hub, use the command:

`cd <doodle> && docker buildx build -f Dockerfile.cross --platform linux/amd64,linux/arm64,linux/arm/v8,linux/s390x,linux/ppc64le,windows/amd64 -t <username>/doodle:<doodle> --push .`
`cd cheers2019 && docker buildx build -f Dockerfile.cross --platform linux/amd64,linux/arm64,linux/arm/v8,linux/s390x,linux/ppc64le,windows/amd64 -t dslzuha/doodle:cheers2019 --push .`

This will build the Doodle for these architectures:
* linux/amd64 (64 bit Linux native)
Expand Down
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1.0.{build}
image: Ubuntu
nuget:
account_feed: true
project_feed: true
4 changes: 2 additions & 2 deletions cheers2019/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ It's time for Dockercon SF 2019, and Moby wanted to celebrate it in docker style

To try it out, run:

`docker run -it --rm docker/doodle:cheers`
`docker run -it --rm dslzuha/doodle:cheers2019`

Complete source can be found [here](https://github.com/docker/doodle).
Complete source can be found [here](https://github.com/dslzuha/doodle).