Skip to content

fix Dockerfile

fix Dockerfile #43

Workflow file for this run

name: Docker Images
on:
workflow_dispatch:
push:
branches:
- main
- feature/*
jobs:
# When pushing to the main branch, we (re)generate images, tagged with
# "latest"
ghcr:
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
-
name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push Base Image
uses: docker/build-push-action@v3
with:
push: true
file: Dockerfile.base
platforms: linux/amd64,linux/arm64,linux/i386
tags: ghcr.io/efrecon/sshd-cloudflared-base:latest
-
name: Build and push DevEnv Image
uses: docker/build-push-action@v3
with:
push: true
file: Dockerfile
platforms: linux/amd64,linux/arm64,linux/i386
tags: ghcr.io/efrecon/sshd-cloudflared:latest
# When pushing to feature branches, we test stuff on the platform of the
# runner only, using a local registry so as to be able to push and pull to
# Docker from the builder steps.
build:
runs-on: ubuntu-latest
if: github.ref_name != 'main'
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
-
name: Build Base Image
uses: docker/build-push-action@v3
id: base
with:
push: true
file: Dockerfile.base
tags: localhost:5000/efrecon/sshd-cloudflared-base:latest
-
name: Build DevEnv Image
uses: docker/build-push-action@v3
with:
push: true
build-args: |
BASEIMAGE=localhost:5000/efrecon/sshd-cloudflared-base:latest
file: Dockerfile
tags: localhost:5000/efrecon/sshd-cloudflared:latest