Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
austinwbest committed Nov 15, 2023
0 parents commit 7d7dcda
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/Dockerfile
/LICENSE
/README.md
/.github
16 changes: 16 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"docker:enableMajor",
"default:automergeDigest"
],
"packageRules": [
{
"matchDatasources": ["docker"],
"matchPackageNames": ["ubuntu"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
]
}
67 changes: 67 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Docker

# This all came from github. I wrote none of it, but I did remove some bits that didn't work.

on:
push:
branches: [ "main" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
77 changes: 77 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.18

# set version label
ARG BUILD_DATE
ARG VERSION
ARG NGINX_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"


# install packages
RUN \
if [ -z ${NGINX_VERSION+x} ]; then \
NGINX_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:nginx$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
apk add --no-cache \
memcached \
nginx==${NGINX_VERSION} \
nginx-mod-http-brotli==${NGINX_VERSION} \
nginx-mod-http-dav-ext==${NGINX_VERSION} \
nginx-mod-http-echo==${NGINX_VERSION} \
nginx-mod-http-fancyindex==${NGINX_VERSION} \
nginx-mod-http-geoip==${NGINX_VERSION} \
nginx-mod-http-geoip2==${NGINX_VERSION} \
nginx-mod-http-headers-more==${NGINX_VERSION} \
nginx-mod-http-image-filter==${NGINX_VERSION} \
nginx-mod-http-perl==${NGINX_VERSION} \
nginx-mod-http-redis2==${NGINX_VERSION} \
nginx-mod-http-set-misc==${NGINX_VERSION} \
nginx-mod-http-upload-progress==${NGINX_VERSION} \
nginx-mod-http-xslt-filter==${NGINX_VERSION} \
nginx-mod-mail==${NGINX_VERSION} \
nginx-mod-rtmp==${NGINX_VERSION} \
nginx-mod-stream==${NGINX_VERSION} \
nginx-mod-stream-geoip==${NGINX_VERSION} \
nginx-mod-stream-geoip2==${NGINX_VERSION} \
nginx-vim==${NGINX_VERSION} \
php82-bcmath \
php82-bz2 \
php82-dom \
php82-exif \
php82-ftp \
php82-gd \
php82-gmp \
php82-imap \
php82-intl \
php82-ldap \
php82-mysqli \
php82-mysqlnd \
php82-opcache \
php82-pdo_mysql \
php82-pdo_odbc \
php82-pdo_pgsql \
php82-pdo_sqlite \
php82-pear \
php82-pecl-apcu \
php82-pecl-memcached \
php82-pecl-redis \
php82-pgsql \
php82-posix \
php82-soap \
php82-sockets \
php82-sodium \
php82-sqlite3 \
php82-tokenizer \
php82-xmlreader \
php82-xsl && \
apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
php82-pecl-mcrypt

# ports and volumes
EXPOSE 80 443

VOLUME /config

0 comments on commit 7d7dcda

Please sign in to comment.