Browse Source

Enable content trust at build stage

Piotr Orzechowski 3 months ago
parent
commit
e193208418
2 changed files with 3 additions and 9 deletions
  1. 2 5
      Dockerfile
  2. 1 4
      build.sh

+ 2 - 5
Dockerfile View File

@@ -1,6 +1,4 @@
1
-ARG golang_version
2
-ARG alpine_version
3
-FROM "golang:${golang_version}-alpine${alpine_version}" as builder
1
+FROM golang:1.9-alpine3.6 as builder
4 2
 
5 3
 RUN set -eu; apk --no-cache add \
6 4
              gcc \
@@ -21,8 +19,7 @@ RUN set -eu; git clone --branch "v${gitea_version}" --depth 1 --no-checkout "$gi
21 19
 ARG gitea_build_tags
22 20
 RUN set -eu; TAGS="$gitea_build_tags" make generate build
23 21
 
24
-ARG alpine_version
25
-FROM "alpine:${alpine_version}"
22
+FROM alpine:3.6
26 23
 
27 24
 LABEL maintainer="Piotr Orzechowski [orzechowski.tech]"
28 25
 

+ 1 - 4
build.sh View File

@@ -6,16 +6,13 @@ gitea_version='1.2.3'
6 6
 gitea_checksum='09bd05732de61930c99509ee5a25816895f430a8'
7 7
 gitea_build_tags='bindata sqlite'
8 8
 gitea_repo_url='https://github.com/go-gitea/gitea.git'
9
-golang_version='1.9'
10
-alpine_version='3.6'
11 9
 image_name='orzech/gitea'
12 10
 
13 11
 docker build \
12
+  --disable-content-trust=false \
14 13
   --build-arg gitea_version="$gitea_version" \
15 14
   --build-arg gitea_checksum="$gitea_checksum" \
16 15
   --build-arg gitea_build_tags="$gitea_build_tags" \
17 16
   --build-arg gitea_repo_url="$gitea_repo_url" \
18
-  --build-arg golang_version="$golang_version" \
19
-  --build-arg alpine_version="$alpine_version" \
20 17
   -t "${IMAGE_NAME:-${image_name}}" \
21 18
   .