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

Commit 70c676b

Browse files
authored
Merge pull request #9 from pjbgf/bump
2 parents a926b57 + d03403a commit 70c676b

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

Dockerfile.test

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This Dockerfile tests the hack/Makefile output against git2go.
22
ARG BASE_VARIANT=bullseye
3-
ARG GO_VERSION=1.17.5
4-
ARG XX_VERSION=1.0.0-rc.2
3+
ARG GO_VERSION=1.17.6
4+
ARG XX_VERSION=1.1.0
55

66
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
77

@@ -12,6 +12,14 @@ FROM gostable AS go-linux
1212
FROM go-${TARGETOS} AS build-base-bullseye
1313

1414
COPY --from=xx / /
15+
16+
# Align golang base image with bookworm.
17+
# TODO: Replace this with a golang bookworm variant, once it is released.
18+
RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list.d/bookworm.list \
19+
&& echo "deb-src http://deb.debian.org/debian bookworm main" /etc/apt/sources.list.d/bookworm.list \
20+
&& xx-apt update \
21+
&& xx-apt -t bookworm upgrade -y
22+
1523
COPY ./hack/Makefile /libgit2/Makefile
1624

1725
RUN make -C /libgit2/ cmake

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ The following dependencies should be present in the image running the applicatio
5454

5555
- `libc6`
5656
- `ca-certificates`
57-
- `zlib1g/sid`
58-
- `libssl1.1/sid`
59-
- `libssh2-1/sid`
57+
- `zlib1g/bookworm`
58+
- `libssl1.1/bookworm`
59+
- `libssh2-1/bookworm`
6060

61-
**Note:** at present, all dependencies suffixed with `sid` should be installed from Debian's `sid` (unstable) release,
62-
[due to a misconfiguration in `libssh2-1` for earlier versions][libssh2-1-misconfiguration].
61+
**Note:** at present, all dependencies suffixed with `bookworm` must be installed from Debian's `bookworm` release,
62+
[due to a misconfiguration in `libssh2-1` in earlier versions][libssh2-1-misconfiguration].
6363

6464
### `Dockerfile` example
6565

6666
```Dockerfile
6767
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
6868
FROM fluxcd/golang-with-libgit2 as libgit2
6969

70-
FROM --platform=$BUILDPLATFORM golang:1.16.8-bullseye as build
70+
FROM --platform=$BUILDPLATFORM golang:1.17.6-bullseye as build
7171

7272
# Copy the build utiltiies
7373
COPY --from=xx / /
@@ -103,14 +103,12 @@ ARG TARGETPLATFORM
103103
RUN xx-go build -o app \
104104
main.go
105105

106-
FROM debian:buster-slim as controller
106+
FROM debian:bookworm-slim as controller
107107

108108
# Install runtime dependencies
109-
RUN echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list \
110-
&& echo "deb-src http://deb.debian.org/debian sid main" >> /etc/apt/sources.list \
111-
&& apt update \
112-
&& apt install --no-install-recommends -y zlib1g/sid libssl1.1/sid libssh2-1/sid \
113-
&& apt install --no-install-recommends -y ca-certificates \
109+
RUN apt update \
110+
&& apt install -y zlib1g/bookworm libssl1.1 libssh2-1 \
111+
&& apt install -y ca-certificates \
114112
&& apt clean \
115113
&& apt autoremove --purge -y \
116114
&& rm -rf /var/lib/apt/lists/*

hack/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,20 @@ endif
4747
cmake:
4848
ifeq (debian,$(XX_VENDOR))
4949
cmake:
50-
apt-get update && apt-get install --no-install-recommends -y clang cmake
50+
apt-get update && apt-get install -y clang cmake
5151
endif
5252
.PHONY: cmake
5353

5454
base:
5555
ifeq (debian,$(XX_VENDOR))
5656
base:
57-
xx-apt update && xx-apt install --no-install-recommends -y binutils gcc libc6-dev dpkg-dev
57+
xx-apt update && xx-apt install -y binutils gcc libc6-dev dpkg-dev
5858
endif
5959
.PHONY: base
6060

6161
dependencies: base
6262
ifeq (debian,$(XX_VENDOR))
63-
# Install libssh2 for $TARGETPLATFORM from "sid", as the version in "bullseye"
63+
# Install libssh2 for $TARGETPLATFORM from "bookworm", as the version in "bullseye"
6464
# has been linked against gcrypt, which causes issues with PKCS* formats.
6565
# We pull (sub)dependencies from there as well, to ensure all versions are aligned,
6666
# and not accidentially linked to e.g. mbedTLS (which has limited support for
@@ -80,10 +80,10 @@ endif
8080
dependencies:
8181
ifneq ("",$(DEPENDENCIES))
8282
set -e; \
83-
echo "deb http://deb.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list \
84-
&& echo "deb-src http://deb.debian.org/debian sid main" /etc/apt/sources.list.d/sid.list \
83+
echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list.d/bookworm.list \
84+
&& echo "deb-src http://deb.debian.org/debian bookworm main" /etc/apt/sources.list.d/bookworm.list \
8585
&& xx-apt update \
86-
&& xx-apt -t sid install --no-install-recommends -y $(DEPENDENCIES)
86+
&& xx-apt -t bookworm install -y $(DEPENDENCIES)
8787
endif
8888
endif
8989
.PHONY: dependencies

0 commit comments

Comments
 (0)