Skip to content

Commit

Permalink
Attempt to build to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusramberg committed Sep 27, 2023
1 parent 8195a27 commit 211f20a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 37 deletions.
44 changes: 31 additions & 13 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
name: docker
name: ghcr
on:
push:
branches:
- main
branches:
- main
- marcus/docker-fix
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: actions/checkout@v3
- name: Login to registry
uses: "docker/[email protected]"
with:
registry: ${{ env.REGISTRY }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
context: ./
file: ./Dockerfile
push: true
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/convos-chat/convos:base"

tags: "ghcr.io/convos-chat/convos-base:main"
push: true
labels: ${{ steps.meta.outputs.labels }}
48 changes: 24 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
FROM alpine:3.14
FROM alpine:3.18
LABEL maintainer="[email protected]"

ADD https://cpanmin.us/ /bin/cpanm
RUN chmod 0755 /bin/cpanm

RUN apk add --no-cache curl openssl perl perl-io-socket-ssl perl-net-ssleay wget && \
apk add --no-cache --virtual builddeps build-base perl-dev && \
/bin/cpanm -n -M https://cpan.metacpan.org \
Module::Install \
Cpanel::JSON::XS \
Crypt::Eksblowfish \
DBD::SQLite \
EV \
File::chdir \
File::HomeDir \
File::ReadBackwards \
HTTP::AcceptLanguage \
Hailo \
IO::Socket::Socks \
IRC::Utils \
Math::Calc::Parser \
Net::LDAP \
Parse::IRC \
Text::Markdown \
Time::Piece \
Unicode::UTF8 \
YAML::XS && \
apk del builddeps && \
rm -rf /root/.cpanm /var/cache/apk/*
apk add --no-cache --virtual builddeps build-base perl-dev && \
/bin/cpanm -n -M https://cpan.metacpan.org \
Module::Install \
Cpanel::JSON::XS \
Crypt::Eksblowfish \
DBD::SQLite \
EV \
File::chdir \
File::HomeDir \
File::ReadBackwards \
HTTP::AcceptLanguage \
Hailo \
IO::Socket::Socks \
IRC::Utils \
Math::Calc::Parser \
Net::LDAP \
Parse::IRC \
Text::Markdown \
Time::Piece \
Unicode::UTF8 \
YAML::XS && \
apk del builddeps && \
rm -rf /root/.cpanm /var/cache/apk/*

CMD ["sh"]

0 comments on commit 211f20a

Please sign in to comment.