Skip to content

Commit

Permalink
Bump version for docker image (#319)
Browse files Browse the repository at this point in the history
* Bump alpine to 3.17

* Upgrade dependencies

* No longer build image for linux/s390x

Tor package for linux/s390x no longer available alpine 3.17

* Update CHANGELOG.md
  • Loading branch information
waybackarchiver committed Feb 21, 2023
1 parent 7060849 commit cf4f6b2
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 51 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
sum.golang.org:443
- name: Checkout default branch
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -90,37 +90,37 @@ jobs:
echo "images=${DOCKER_HOST}/${DOCKER_IMAGE_SCOPE},${GHCR_HOST}/${DOCKER_IMAGE_SCOPE}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v2.0.0
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v2.0.0
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2.0.0
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2.0.0
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate meta
id: meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v4.0.1
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
with:
images: ${{ steps.prep.outputs.images }}
tags: |
type=semver,pattern=${{ steps.prep.outputs.version }}
type=raw,${{ steps.prep.outputs.version }}
- name: Build artifacts
uses: docker/bake-action@fb56172975f3a7f62d2defb5d32d735a2eaa41eb # v2.0.0
uses: docker/bake-action@6c87dcca988e4e074e3ab1f976a70f63ec9673fb # v2.3.0
env:
WAYBACK_IPFS_APIKEY: ${{ secrets.WAYBACK_IPFS_APIKEY }}
with:
Expand All @@ -131,7 +131,7 @@ jobs:
*.cache-to=type=local,dest=/tmp/.image-cache-new/artifacts
- name: Build and push Docker image
uses: docker/bake-action@fb56172975f3a7f62d2defb5d32d735a2eaa41eb # v2.0.0
uses: docker/bake-action@6c87dcca988e4e074e3ab1f976a70f63ec9673fb # v2.3.0
env:
WAYBACK_IPFS_APIKEY: ${{ secrets.WAYBACK_IPFS_APIKEY }}
with:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
sum.golang.org:443
- name: Checkout default branch
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -231,22 +231,22 @@ jobs:
echo "images=${GHCR_HOST}/${DOCKER_IMAGE_SCOPE}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v2.0.0
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v2.0.0
uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # v2.4.1

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v2.0.0
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate meta
id: meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v4.0.1
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4.3.0
with:
images: ${{ steps.prep.outputs.images }}
flavor: |
Expand All @@ -256,7 +256,7 @@ jobs:
type=raw,${{ steps.prep.outputs.version }}
- name: Build artifacts
uses: docker/bake-action@fb56172975f3a7f62d2defb5d32d735a2eaa41eb # v2.0.0
uses: docker/bake-action@6c87dcca988e4e074e3ab1f976a70f63ec9673fb # v2.3.0
env:
WAYBACK_IPFS_APIKEY: ${{ secrets.WAYBACK_IPFS_APIKEY }}
with:
Expand All @@ -267,7 +267,7 @@ jobs:
*.cache-to=type=local,dest=/tmp/.image-cache-new/artifacts
- name: Build and push Docker image
uses: docker/bake-action@fb56172975f3a7f62d2defb5d32d735a2eaa41eb # v2.0.0
uses: docker/bake-action@6c87dcca988e4e074e3ab1f976a70f63ec9673fb # v2.3.0
env:
WAYBACK_IPFS_APIKEY: ${{ secrets.WAYBACK_IPFS_APIKEY }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go: [ "1.18", "1.19" ]
go: [ "1.18", "1.19", "1.20" ]
include:
# only update test coverage stats with the most recent go version on linux
- go: 1.x
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename `HTTP_LISTEN_ADDR` to `WAYBACK_LISTEN_ADDR`
- Support for `WAYBACK_LISTEN_ADDR` override `WAYBACK_TOR_LOCAL_PORT`
- Defaults to listen `0.0.0.0` for httpd service
- Bump version for docker image ([#319](https://github.com/wabarc/wayback/pull/319))
- Bump alpine to 3.17
- Upgrade dependencies for docker workflow
- No longer build image for `linux/s390x`

### Fixed
- Fix semgrep scan workflow ([#312](https://github.com/wabarc/wayback/pull/312))
Expand Down
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# license that can be found in the LICENSE file.
#
# syntax=docker/dockerfile:1.2
ARG GO_VERSION=1.19
ARG GO_VERSION=1.20

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
COPY --from=tonistiigi/xx:golang / /
Expand All @@ -26,7 +26,7 @@ RUN --mount=type=bind,target=/src,rw \
&& mv ./build/binary/wayback-* /wayback

# Application layer
FROM alpine:3.15
FROM alpine:3.17

LABEL org.wabarc.homepage="http://github.com/wabarc" \
org.wabarc.repository="http://github.com/wabarc/wayback" \
Expand Down Expand Up @@ -77,17 +77,15 @@ EXPOSE 8964
# add flag `--format=docker` if using podman.
# Ref: https://wiki.alpinelinux.org/wiki/Fonts
ONBUILD RUN set -o pipefail; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/community >> /etc/apk/repositories; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/main >> /etc/apk/repositories; \
apk add --no-cache -U \
chromium@v3.15 \
chromium \
dbus \
dumb-init \
ffmpeg@v3.15 \
freetype@v3.15 \
ffmpeg \
freetype \
libstdc++ \
harfbuzz@v3.15 \
nss@v3.15 \
harfbuzz \
nss \
you-get \
rtmpdump \
youtube-dl \
Expand Down
16 changes: 7 additions & 9 deletions build/docker/Dockerfile.all
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.2
ARG GO_VERSION=1.19
ARG GO_VERSION=1.20

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder
COPY --from=tonistiigi/xx:golang / /
Expand All @@ -22,7 +22,7 @@ RUN --mount=type=bind,target=/src,rw \
&& mv ./build/binary/wayback-* /wayback

# Application layer
FROM alpine:3.15
FROM alpine:3.17

LABEL org.wabarc.homepage="http://github.com/wabarc" \
org.wabarc.repository="http://github.com/wabarc/wayback" \
Expand Down Expand Up @@ -70,17 +70,15 @@ RUN set -o pipefail; \

# Ref: https://wiki.alpinelinux.org/wiki/Fonts
RUN set -o pipefail; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/community >> /etc/apk/repositories; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/main >> /etc/apk/repositories; \
apk add --no-cache -U \
chromium@v3.15 \
chromium \
dbus \
dumb-init \
ffmpeg@v3.15 \
freetype@v3.15 \
ffmpeg \
freetype \
libstdc++ \
harfbuzz@v3.15 \
nss@v3.15 \
harfbuzz \
nss \
you-get \
rtmpdump \
youtube-dl \
Expand Down
16 changes: 7 additions & 9 deletions build/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.2
ARG GO_VERSION=1.19
ARG GO_VERSION=1.20

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Expand All @@ -19,7 +19,7 @@ RUN set -eu && \
&& mv ./build/binary/wayback-* /wayback

# Application layer
FROM alpine:3.15
FROM alpine:3.17

LABEL org.wabarc.homepage="http://github.com/wabarc" \
org.wabarc.repository="http://github.com/wabarc/wayback" \
Expand Down Expand Up @@ -71,17 +71,15 @@ EXPOSE 8964
# Trigger on downstream build, only support for docker,
# add flag `--format=docker` if using podman.
ONBUILD RUN set -o pipefail; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/community >> /etc/apk/repositories; \
echo @v3.15 https://dl-cdn.alpinelinux.org/alpine/v3.15/main >> /etc/apk/repositories; \
apk add --no-cache -U \
chromium@v3.15 \
chromium \
dbus \
dumb-init \
ffmpeg@v3.15 \
freetype@v3.15 \
ffmpeg \
freetype \
libstdc++ \
harfbuzz@v3.15 \
nss@v3.15 \
harfbuzz \
nss \
you-get \
rtmpdump \
youtube-dl \
Expand Down
2 changes: 1 addition & 1 deletion build/redhat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Use of this source code is governed by the GNU GPL v3
# license that can be found in the LICENSE file.
#
FROM golang:1.19-alpine AS builder
FROM golang:1.20-alpine AS builder

ARG WAYBACK_IPFS_APIKEY

Expand Down
11 changes: 4 additions & 7 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Go version
variable "GO_VERSION" {
default = "1.19"
default = "1.20"
}

variable "WAYBACK_IPFS_APIKEY" {
Expand Down Expand Up @@ -50,8 +50,7 @@ target "artifact-all" {
"linux/arm/v6",
"linux/arm/v7",
"linux/arm64",
"linux/ppc64le",
"linux/s390x"
"linux/ppc64le"
]
}

Expand All @@ -64,8 +63,7 @@ target "release" {
"linux/arm/v6",
"linux/arm/v7",
"linux/arm64",
"linux/ppc64le",
"linux/s390x"
"linux/ppc64le"
]
}

Expand All @@ -79,7 +77,6 @@ target "bundle" {
"linux/arm/v6",
"linux/arm/v7",
"linux/arm64",
"linux/ppc64le",
"linux/s390x"
"linux/ppc64le"
]
}

0 comments on commit cf4f6b2

Please sign in to comment.