Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
flabatut committed Mar 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2865bc9 commit 75f20b8
Showing 2 changed files with 51 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# https://docs.docker.com/build/ci/github-actions/multi-platform/
# https://dev.to/cloudx/multi-arch-docker-images-the-easy-way-with-github-actions-4k54
name: ci

on:
push:
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/flabatut/certbot-dns-powerdns:latest
# tags: ${{ steps.META_ID.outputs.tags }}
# labels: ${{ steps.META_ID.outputs.labels }}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.9-slim AS builder

WORKDIR /build
COPY requirements.txt .
RUN apt update \
&& apt install -y gcc make \
&& pip install --upgrade pip \
&& pip install wheel setuptools \
&& pip wheel -r requirements.txt --wheel-dir=/build/wheels

FROM python:3.9-slim
COPY --from=builder /build /build
RUN pip install --no-index --find-links=/build/wheels -r /build/requirements.txt \
&& rm -rf /build
ENTRYPOINT ["/usr/local/bin/certbot"]

0 comments on commit 75f20b8

Please sign in to comment.