Skip to content

Commit 37fe094

Browse files
authored
Dockerfile: allow inserting custom certs (#463)
1 parent 0509ecc commit 37fe094

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

.license-scan-overrides.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{"name": "github.com/chzyer/logex", "licenceType": "MIT"}
2+
{"name": "github.com/grpc-ecosystem/go-grpc-middleware/v2", "licenceType": "Apache-2.0"}
23
{"name": "github.com/hashicorp/vault/api/auth/approle", "licenceType": "MPL-2.0"}
34
{"name": "github.com/jpillora/longestcommon", "licenceType": "MIT"}
45
{"name": "github.com/logrusorgru/aurora", "licenceType": "Unlicense"}

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ COPY . /src
99
ARG BININFO_BUILD_DATE BININFO_COMMIT_HASH BININFO_VERSION # provided to 'make install'
1010
RUN make -C /src install PREFIX=/pkg GOTOOLCHAIN=local GO_BUILDFLAGS='-mod vendor'
1111

12+
COPY certs/*.crt /usr/local/share/ca-certificates/
13+
14+
RUN update-ca-certificates
15+
1216
################################################################################
1317

1418
# To only build the tests run: docker build . --target test

Makefile.maker.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ dockerfile:
1212
enabled: true
1313
checkEnv:
1414
- CHECK_SKIPS_FUNCTIONAL_TEST=true
15+
extraBuildDirectives:
16+
# If ihe CI has supplied additional CA certificates, include them in the CA bundle
17+
- 'COPY certs/*.crt /usr/local/share/ca-certificates/'
18+
- 'RUN update-ca-certificates'
1519
extraIgnores:
1620
- examples/
1721
- make-config.sh
@@ -52,6 +56,8 @@ renovate:
5256
reuse:
5357
annotations:
5458
- paths:
59+
- certs/*.crt
60+
- certs/README.md
5561
- examples/*.yaml
5662
SPDX-FileCopyrightText: SAP SE or an SAP affiliate company
5763
SPDX-License-Identifier: Apache-2.0

REUSE.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ SPDX-License-Identifier = "Apache-2.0"
2121

2222
[[annotations]]
2323
path = [
24+
"certs/*.crt",
25+
"certs/README.md",
2426
"examples/*.yaml",
2527
]
2628
SPDX-FileCopyrightText = "SAP SE or an SAP affiliate company"

certs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# `certs/`
2+
3+
If your swift-http-import build needs to accept additional (e.g. company-internal) CA certificates,
4+
put them into this folder as a `.crt` file, and `docker build` will pick them up automatically.

0 commit comments

Comments
 (0)