Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 5a78034

Browse files
committed
.
1 parent 5d0211e commit 5a78034

6 files changed

Lines changed: 1020 additions & 0 deletions

File tree

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: 'build docker images: qwebirc'
2+
3+
on:
4+
#push:
5+
# branches:
6+
# - 'main'
7+
# - 'master'
8+
# paths:
9+
# - 'Dockerfile'
10+
# - 'docker-entrypoint.sh'
11+
# - 'config.py'
12+
# - '.github/workflows/build_docker_images.yaml'
13+
workflow_dispatch:
14+
schedule:
15+
- cron: '30 5 27 * *' # At 05:30 on day-of-month 27.
16+
17+
defaults:
18+
run:
19+
shell: bash
20+
21+
jobs:
22+
docker:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
28+
- name: Shell-Script
29+
id: script
30+
run: |
31+
BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
32+
BUILD_DATE_NUMERIC="${BUILD_DATE//[^[:digit:]]/}"
33+
COMMIT_HASH=${GITHUB_SHA::8}
34+
GITHUB_REPO=${GITHUB_REPOSITORY,,}
35+
GITHUB_REPO_SHORT=${GITHUB_REPO#*/}
36+
#DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
37+
#REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
38+
39+
# Set output parameters to github action.
40+
echo ::set-output name=build_date::${BUILD_DATE}
41+
echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
42+
echo ::set-output name=commit_hash::${COMMIT_HASH}
43+
echo ::set-output name=github_repo::${GITHUB_REPO}
44+
#echo ::set-output name=docker_repo::${DOCKER_REPO}
45+
#echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
46+
47+
- name: Set up QEMU
48+
id: qemu
49+
uses: docker/setup-qemu-action@v1
50+
with:
51+
image: tonistiigi/binfmt:latest
52+
platforms: all
53+
54+
- name: Set up Docker Buildx
55+
id: buildx
56+
uses: docker/setup-buildx-action@master
57+
58+
- name: Login to GitHub Container Registry
59+
uses: docker/login-action@v1
60+
with:
61+
registry: ghcr.io
62+
username: ${{ github.repository_owner }}
63+
password: ${{ secrets.GITHUB_TOKEN }}
64+
65+
#- name: Login to DockerHub
66+
# uses: docker/login-action@v1
67+
# with:
68+
# registry: docker.io
69+
# username: ${{ secrets.DOCKER_USERNAME }}
70+
# password: ${{ secrets.DOCKER_PASSWORD }}
71+
72+
#- name: Login to RED HAT Quay.io Container Registry
73+
# uses: docker/login-action@v1
74+
# with:
75+
# registry: quay.io
76+
# username: ${{ secrets.REDHAT_QUAY_USERNAME }}
77+
# password: ${{ secrets.REDHAT_QUAY_PASSWORD }}
78+
79+
- name: Build
80+
uses: docker/build-push-action@v2
81+
with:
82+
builder: ${{ steps.buildx.outputs.name }}
83+
context: .
84+
file: ./Dockerfile
85+
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
86+
push: true
87+
build-args: |
88+
BUILD_DATE=${{steps.script.outputs.build_date}}
89+
VCS_REF=${{steps.script.outputs.commit_hash}}
90+
tags: |
91+
ghcr.io/${{steps.script.outputs.github_repo}}:${{steps.script.outputs.build_date_numeric}}.${{steps.script.outputs.commit_hash}}
92+
ghcr.io/${{steps.script.outputs.github_repo}}:latest
93+
# docker.io/${{steps.script.outputs.docker_repo}}:latest
94+
# quay.io/${{steps.script.outputs.redhat_quay_repo}}:latest

Dockerfile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM python:2.7-alpine
2+
3+
LABEL org.opencontainers.image.authors="the qwebirc project, Tobias Hargesheimer <docker@ison.ws>" \
4+
org.opencontainers.image.title="qwebirc" \
5+
org.opencontainers.image.description="qwebirc is a fast, easy to use, free and open source IRC client" \
6+
org.opencontainers.image.created="${BUILD_DATE}" \
7+
org.opencontainers.image.revision="${VCS_REF}" \
8+
org.opencontainers.image.licenses="GPLv2" \
9+
org.opencontainers.image.url="ghcr.io/tob1asdocker/qwebirc:latest" \
10+
org.opencontainers.image.source="https://github.com/Tob1asDocker/qwebirc"
11+
12+
SHELL ["/bin/sh", "-euxo", "pipefail", "-c"]
13+
14+
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
15+
16+
RUN \
17+
addgroup --gid 1000 qwebirc ; \
18+
adduser --system --shell /sbin/nologin --uid 1000 --ingroup qwebirc --home /qwebirc qwebirc ; \
19+
apk add --no-cache --virtual .build-deps \
20+
gcc \
21+
musl-dev \
22+
libffi-dev \
23+
openssl-dev \
24+
git \
25+
; \
26+
apk add --no-cache \
27+
netcat-openbsd \
28+
# git \
29+
; \
30+
\
31+
git clone https://github.com/qwebirc/qwebirc /qwebirc ; \
32+
cd /qwebirc ; \
33+
pip install --no-cache-dir -r requirements.txt ; \
34+
#pip install --no-cache-dir cryptography==37.0.4 ; \
35+
#pip install --no-cache-dir pyOpenSSL==22.0.0 ; \
36+
pip install --no-cache-dir pyOpenSSL ; \
37+
#pip install --no-cache-dir service-identity==21.1.0 ; \
38+
pip install --no-cache-dir service-identity ; \
39+
rm -r .git ; \
40+
chmod +x compile.py ; \
41+
chmod +x run.py ; \
42+
#cp config.py.example config.py ; \
43+
#./compile.py ; \
44+
chown -R qwebirc:qwebirc /qwebirc ; \
45+
cd / ; \
46+
\
47+
apk del --no-network --purge .build-deps ; \
48+
chmod +x /usr/local/bin/docker-entrypoint.sh
49+
50+
WORKDIR /qwebirc
51+
USER qwebirc
52+
EXPOSE 9090
53+
54+
ENTRYPOINT ["docker-entrypoint.sh"]
55+
CMD ["python2", "-u", "./run.py", "--no-daemon", "--pidfile=qwebirc.pid"]

0 commit comments

Comments
 (0)