Skip to content

Commit

Permalink
Separate local-ca from acme container
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlovelltroy committed Apr 22, 2024
1 parent 9d83eda commit c9c4e67
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
packages: write
contents: read
jobs:
build:
build-local-ca:
runs-on: ubuntu-latest
steps:
- name: check out the repo
Expand Down Expand Up @@ -44,3 +44,40 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-acmesh:
runs-on: ubuntu-latest
steps:
- name: check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/openchami/acme.sh
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
- name: setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to github container repo
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.acme
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM cgr.dev/chainguard/wolfi-base
#install step dependencies
RUN apk add --no-cache wget step step-ca bash acme.sh
RUN apk add --no-cache wget step step-ca bash

ENV CONFIGPATH="/home/step/config/ca.json"
ENV PWDPATH="/home/step/secrets/password"
ENV STEPPATH="/home/step"

RUN mkdir /root_ca
RUN mkdir /root/.acme.sh


VOLUME ["/home/step", "/root-ca"]

Expand Down
7 changes: 7 additions & 0 deletions Dockerfile.acme
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM cgr.dev/chainguard/wolfi-base
#install step dependencies
RUN apk add --no-cache curl openssl acme.sh

RUN mkdir /root/.acme.sh

ENTRYPOINT [ "/usr/bin/acme.sh" ]

0 comments on commit c9c4e67

Please sign in to comment.