Skip to content

Commit 8a79ab5

Browse files
committed
Merge branch 'trixie-image' into 'main'
chore(docker): use image digests in Dockerfile See merge request flarenetwork/ftso/fast-updates!37
2 parents 832ebe7 + d9172de commit 8a79ab5

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ workflow:
44
when: never
55
- when: always
66

7+
variables:
8+
GOLANG_VERSION: "1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9"
9+
710
# lint-ts-simulation:
811
# image: node:18
912
# before_script:
@@ -31,7 +34,7 @@ lint-py-visualizer:
3134
- poetry run ruff check --fix
3235

3336
lint-go-client:
34-
image: golang:1.21.0
37+
image: golang:${GOLANG_VERSION}
3538
before_script:
3639
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
3740
- cd go-client
@@ -43,7 +46,7 @@ lint-go-client:
4346
- golangci-lint run
4447

4548
test-go-client:
46-
image: golang:1.21.0
49+
image: golang:${GOLANG_VERSION}
4750
before_script:
4851
- cd go-client
4952
script:
@@ -58,6 +61,7 @@ test-go-client-docker:
5861
DOCKER_HOST: tcp://docker:2375
5962
DOCKER_TLS_CERTDIR: ""
6063
DOCKER_DRIVER: overlay2
64+
GOLANG_IMAGE: "golang:${GOLANG_VERSION}"
6165
before_script:
6266
- cd go-client/tests
6367
script:

go-client/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# build executable
2-
FROM golang:1.21 AS builder
2+
FROM golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9 AS builder
33

44
WORKDIR /build
55

@@ -14,7 +14,7 @@ COPY . ./
1414
RUN go build -o /app/client ./main.go
1515
RUN go build -o /app/keygen ./keygen/keygen.go
1616

17-
FROM debian:latest AS execution
17+
FROM debian:trixie@sha256:72547dd722cd005a8c2aa2079af9ca0ee93aad8e589689135feaed60b0a8c08d AS execution
1818

1919
WORKDIR /app
2020

go-client/tests/docker-compose.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ services:
99

1010
deploy:
1111
container_name: deploy
12-
image: golang:1.21.0-bullseye
12+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
1313
volumes:
1414
- "../:/client"
1515
working_dir: "/client"
1616
command: /bin/bash -c 'go run tests/test.go --config tests/configs/config_deploy.toml deploy'
17-
17+
1818
mock_register:
1919
container_name: mock_register
20-
image: golang:1.21.0-bullseye
20+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
2121
volumes:
2222
- "../:/client"
2323
working_dir: "/client"
2424
command: /bin/bash -c 'go run tests/test.go --config tests/configs/config1.toml register 2 && go run tests/test.go --config tests/configs/config2.toml register 2 && go run tests/test.go --config tests/configs/config3.toml register 2'
25-
25+
2626
client1:
2727
container_name: client1
28-
image: golang:1.21.0-bullseye
28+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
2929
volumes:
3030
- "../:/client"
3131
working_dir: "/client"
@@ -35,7 +35,7 @@ services:
3535

3636
client2:
3737
container_name: client2
38-
image: golang:1.21.0-bullseye
38+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
3939
volumes:
4040
- "../:/client"
4141
working_dir: "/client"
@@ -45,7 +45,7 @@ services:
4545

4646
client3:
4747
container_name: client3
48-
image: golang:1.21.0-bullseye
48+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
4949
volumes:
5050
- "../:/client"
5151
working_dir: "/client"
@@ -55,7 +55,7 @@ services:
5555

5656
test-client:
5757
container_name: test-client
58-
image: golang:1.21.0-bullseye
58+
image: ${GOLANG_IMAGE:-golang:1.21-bookworm@sha256:c6a5b9308b3f3095e8fde83c8bf4d68bd101fce606c1a0a1394522542509dda9}
5959
volumes:
6060
- "../:/client"
6161
working_dir: "/client"

0 commit comments

Comments
 (0)