Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
d43053e1
Commit
d43053e1
authored
4 years ago
by
m.nabokikh
Browse files
Options
Downloads
Patches
Plain Diff
Download gomplate during building phase
Signed-off-by:
m.nabokikh
<
maksim.nabokikh@flant.com
>
parent
e13aac49
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+6
-6
6 additions, 6 deletions
Dockerfile
with
6 additions
and
6 deletions
Dockerfile
+
6
−
6
View file @
d43053e1
...
@@ -7,11 +7,16 @@ RUN apk add --no-cache --update alpine-sdk
...
@@ -7,11 +7,16 @@ RUN apk add --no-cache --update alpine-sdk
ARG
TARGETOS
ARG
TARGETOS
ARG
TARGETARCH
ARG
TARGETARCH
ARG
TARGETVARIANT=""
ARG
TARGETVARIANT=""
ARG
GOMPLATE_VERSION=v3.9.0
ENV
GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT}
ENV
GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT}
ARG
GOPROXY
ARG
GOPROXY
RUN
wget
-O
/usr/local/bin/gomplate
\
"https://github.com/hairyhenderson/gomplate/releases/download/
${
GOMPLATE_VERSION
}
/gomplate_
${
GOOS
:-
linux
}
-
${
GOARCH
:-
amd64
}${
GOARM
}
"
\
&&
chmod
+x /usr/local/bin/gomplate
COPY
go.mod go.sum ./
COPY
go.mod go.sum ./
COPY
api/v2/go.mod api/v2/go.sum ./api/v2/
COPY
api/v2/go.mod api/v2/go.sum ./api/v2/
RUN
go mod download
RUN
go mod download
...
@@ -27,14 +32,8 @@ FROM alpine:3.13.1
...
@@ -27,14 +32,8 @@ FROM alpine:3.13.1
# experience when this doesn't work out of the box.
# experience when this doesn't work out of the box.
#
#
# OpenSSL is required so wget can query HTTPS endpoints for health checking.
# OpenSSL is required so wget can query HTTPS endpoints for health checking.
ARG
TARGETARCH
ARG
TARGETVARIANT=""
ARG
GOMPLATE_VERSION=v3.9.0
RUN
apk add
--no-cache
--update
ca-certificates openssl
RUN
apk add
--no-cache
--update
ca-certificates openssl
RUN
wget
-O
/usr/local/bin/gomplate
\
"https://github.com/hairyhenderson/gomplate/releases/download/
${
GOMPLATE_VERSION
}
/gomplate_linux-
${
TARGETARCH
:-
amd64
}${
TARGETVARIANT
}
"
\
&&
chmod
+x /usr/local/bin/gomplate
RUN
mkdir
-p
/var/dex
RUN
mkdir
-p
/var/dex
RUN
chown
-R
1001:1001 /var/dex
RUN
chown
-R
1001:1001 /var/dex
...
@@ -47,6 +46,7 @@ RUN chown -R 1001:1001 /etc/dex
...
@@ -47,6 +46,7 @@ RUN chown -R 1001:1001 /etc/dex
COPY
--from=builder /usr/local/src/dex/go.mod /usr/local/src/dex/go.sum /usr/local/src/dex/
COPY
--from=builder /usr/local/src/dex/go.mod /usr/local/src/dex/go.sum /usr/local/src/dex/
COPY
--from=builder /usr/local/src/dex/api/v2/go.mod /usr/local/src/dex/api/v2/go.sum /usr/local/src/dex/api/v2/
COPY
--from=builder /usr/local/src/dex/api/v2/go.mod /usr/local/src/dex/api/v2/go.sum /usr/local/src/dex/api/v2/
COPY
--from=builder /usr/local/bin/gomplate /usr/local/bin/gomplate
COPY
--from=builder /go/bin/dex /usr/local/bin/dex
COPY
--from=builder /go/bin/dex /usr/local/bin/dex
USER
1001:1001
USER
1001:1001
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment