-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to S6 Overlay 3.x and add Ubuntu 22.04 support (#7)
* Upgrade to latest version of S6 Overlay & more (#6) * Added credit * Added S6 Overlay 3.x * Added multi-arch builds * Added docker buildkit * Added docker buildx * Use QEMU emulator * Add multi-arch support * Added 22.04 * Added platforms * Added platforms to production image * Require valid certificate in download * Added CA certificates * Ensure certificates are checked * Added Act support * Added beta workflow * Fixed secrets * Removed whitespace * Added github sha * Remove reference * Specified branch * Fixed reference * Added base OS support * Updated all workflows to new structure * Added execution permissions * Removed execution layer * Bumped S6 Overlay to 3.1.1.0 * Removed syslogd * Keep ENV for S6 * Defaulted to 22.04 * Updated contributing build notes * Upgraded S6 overlay to v3.1.2.1 * Adjusted tag name * Added build stage * Renamed repo * Fixed trigger * Cleaned up comments * Changed variable name
- Loading branch information
1 parent
c9fa04a
commit 51ae689
Showing
12 changed files
with
204 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
GITHUB_TOKEN= | ||
DOCKER_HUB_ACCESS_TOKEN= | ||
DOCKER_HUB_README_PASSWORD= | ||
DOCKER_HUB_README_USERNAME= | ||
DOCKER_HUB_USERNAME= |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Docker Publish (Edge - Pull Request) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '!dev' | ||
|
||
env: | ||
PR_NUMBER: ${{ github.event.pull_request.number }} | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/workflow-docker-publish.yml | ||
with: | ||
tag-prefix: 'edge-${{ env.PR_NUMBER }}-' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Docker Publish (Beta Images) | ||
|
||
on: | ||
# When changes are pushed to the "dev" branch, run it | ||
push: | ||
branches: | ||
- dev | ||
|
||
# Run every week at 0800 UTC to update the images | ||
schedule: | ||
- cron: '0 8 * * 6' | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/workflow-docker-publish.yml | ||
with: | ||
tag-prefix: 'beta-' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Docker Publish (Production Images) | ||
|
||
on: | ||
# When changes are pushed to the "main" branch, run it | ||
push: | ||
branches: | ||
- main | ||
|
||
# Run every week at 0800 UTC to update the images | ||
schedule: | ||
- cron: '0 8 * * 0' | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/workflow-docker-publish.yml | ||
with: | ||
tag-prefix: '' | ||
secrets: inherit | ||
|
||
update_container_readme: | ||
runs-on: ubuntu-latest | ||
name: Push README to Docker Hub | ||
steps: | ||
- name: git checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: push README to Dockerhub | ||
uses: christian-korneck/update-container-description-action@v1 | ||
env: | ||
DOCKER_USER: ${{ secrets.DOCKER_HUB_README_USERNAME }} | ||
DOCKER_PASS: ${{ secrets.DOCKER_HUB_README_PASSWORD }} | ||
with: | ||
destination_container_repo: serversideup/s6-overlay | ||
provider: dockerhub | ||
short_description: 'Base image for projects that need S6 Overlay' | ||
readme_file: 'README.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
tag-prefix: | ||
required: true | ||
type: string | ||
default: 'beta-' | ||
|
||
jobs: | ||
docker-publish: | ||
runs-on: ubuntu-20.04 | ||
# Configure our deployment strategy. Order is important here and we want it to go: CLI < FPM < FPM-NGINX | ||
strategy: | ||
# We want to limit the number of jobs to the number of versions that we're offering (since we want the dependency order to be built correctly) | ||
max-parallel: 2 | ||
# Set our base image and versions here | ||
matrix: | ||
linux-flavor: | ||
- ubuntu | ||
version: | ||
- "20.04" | ||
- "22.04" | ||
steps: | ||
- name: Get branch name | ||
id: branch-name | ||
uses: tj-actions/[email protected] | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ steps.branch-name.outputs.current_branch }} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: | | ||
linux/amd64 | ||
linux/arm/v7 | ||
linux/arm64/v8 | ||
linux/ppc64le | ||
linux/riscv64 | ||
linux/s390x | ||
build-args: | | ||
BASE_OS_IMAGE=${{ matrix.linux-flavor }}:${{ matrix.version }} | ||
pull: true | ||
push: true | ||
tags: "serversideup/s6-overlay:${{ inputs.tag-prefix}}${{ matrix.linux-flavor }}-${{ matrix.version }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,48 @@ | ||
FROM ubuntu:20.04 | ||
LABEL maintainer="@jaydrogers" | ||
ARG BASE_IMAGE=ubuntu:22.04 | ||
|
||
# build image | ||
FROM ${BASE_IMAGE} as build | ||
|
||
ARG S6_DIR=/opt/s6/ | ||
ARG S6_SRC_DEP="xz-utils wget" | ||
ARG S6_SRC_URL="https://github.com/just-containers/s6-overlay/releases/download" | ||
ARG S6_VERSION="v3.1.2.1" | ||
|
||
# set version for s6 overlay | ||
ARG OVERLAY_VERSION="v2.2.0.3" | ||
ARG OVERLAY_ARCH="amd64" | ||
ENV DEBIAN_FRONTEND="noninteractive" \ | ||
S6_KEEP_ENV=1 | ||
|
||
# install S6 Overlay | ||
RUN mkdir -p $S6_DIR; \ | ||
apt-get update; \ | ||
apt-get install -yq $S6_SRC_DEP --no-install-recommends --no-install-suggests; \ | ||
export SYS_ARCH=$(uname -m); \ | ||
case "$SYS_ARCH" in \ | ||
aarch64 ) export S6_ARCH='aarch64' ;; \ | ||
arm64 ) export S6_ARCH='aarch64' ;; \ | ||
armhf ) export S6_ARCH='armhf' ;; \ | ||
arm* ) export S6_ARCH='arm' ;; \ | ||
i4* ) export S6_ARCH='i486' ;; \ | ||
i6* ) export S6_ARCH='i686' ;; \ | ||
riscv64 ) export S6_ARCH='riscv64' ;; \ | ||
s390* ) export S6_ARCH='s390x' ;; \ | ||
* ) export S6_ARCH='x86_64' ;; \ | ||
esac; \ | ||
untar (){ \ | ||
echo "⏬ Downloading $1"; \ | ||
wget --no-check-certificate -O- $1 | tar Jxp -C $S6_DIR; \ | ||
}; \ | ||
\ | ||
echo "⬇️ Downloading s6 overlay:${S6_ARCH}-${S6_VERSION} for ${SYS_ARCH}" \ | ||
&& untar ${S6_SRC_URL}/${S6_VERSION}/s6-overlay-noarch.tar.xz \ | ||
&& untar ${S6_SRC_URL}/${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.xz | ||
|
||
# main image | ||
FROM ${BASE_IMAGE} | ||
LABEL maintainer="@jaydrogers" | ||
|
||
# add s6 overlay | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/ | ||
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer | ||
ENV DEBIAN_FRONTEND="noninteractive" \ | ||
S6_KEEP_ENV=1 | ||
|
||
# set environment variables | ||
ARG DEBIAN_FRONTEND="noninteractive" | ||
ENV HOME="/root" \ | ||
LANGUAGE="en_US.UTF-8" \ | ||
LANG="en_US.UTF-8" \ | ||
TERM="xterm" | ||
COPY --from=build /opt/s6/ / | ||
|
||
ENTRYPOINT ["/init"] |
Oops, something went wrong.