Skip to content

Commit

Permalink
Refactor: Bump variants to alpine 3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Jan 2, 2025
1 parent 8530ccc commit 208ec9e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
27 changes: 15 additions & 12 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
$local:VERSIONS = @( Get-Content $PSScriptRoot/versions.json -Encoding utf8 -raw | ConvertFrom-Json )
$local:PACKAGE = 'isync'
# $local:VERSIONS = @( Get-Content $PSScriptRoot/versions.json -Encoding utf8 -raw | ConvertFrom-Json )

# Docker image variants' definitions
$local:VARIANTS_MATRIX = @(
foreach ($v in $local:VERSIONS.isync.versions) {
@{
package_version = $v
subvariants = @(
@{ components = @() }
@{ components = @('pingme') }
@{ components = @('restic') }
@{ components = @('restic', 'pingme') }
)
}
@{
package = 'isync'
package_version = '1.4.4'
distro = 'alpine'
distro_version = '3.19'
subvariants = @(
@{ components = @() }
@{ components = @('pingme') }
@{ components = @('restic') }
@{ components = @('restic', 'pingme') }
)
}
)

Expand All @@ -22,7 +22,10 @@ $VARIANTS = @(
@{
# Metadata object
_metadata = @{
package = $variant['package']
package_version = $variant['package_version']
distro = $variant['distro']
distro_version = $variant['distro_version']
platforms = & {
if ( $subVariant['components'] -contains 'pingme') {
'linux/386,linux/amd64,linux/arm/v7,linux/arm64'
Expand Down
4 changes: 2 additions & 2 deletions generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@"
# syntax=docker/dockerfile:1
FROM alpine:3.17
FROM $( $VARIANT['_metadata']['distro'] ):$( $VARIANT['_metadata']['distro_version'] )
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
Expand All @@ -22,7 +22,7 @@ RUN set -eu; \
# Install isync
RUN apk add --no-cache ca-certificates
RUN set -eux; \
apk add --no-cache isync~$( $VARIANT['_metadata']['package_version'] ); \
apk add --no-cache $( $VARIANT['_metadata']['package'] )~$( $VARIANT['_metadata']['package_version'] ); \
# For mbsync-get-cert to get a self-signed certificate
apk add --no-cache openssl; \
mbsync --version
Expand Down
2 changes: 1 addition & 1 deletion variants/1.4.4-pingme/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine:3.17
FROM alpine:3.19
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion variants/1.4.4-restic-pingme/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine:3.17
FROM alpine:3.19
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion variants/1.4.4-restic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine:3.17
FROM alpine:3.19
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion variants/1.4.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM alpine:3.17
FROM alpine:3.19
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
Expand Down

0 comments on commit 208ec9e

Please sign in to comment.