diff options
| author | Clement Ho <clemmakesapps@gmail.com> | 2017-06-26 15:36:29 +0000 |
|---|---|---|
| committer | Kushal Pandya <kushalspandya@gmail.com> | 2017-06-26 15:47:15 +0000 |
| commit | 5461623dca6cfbae5794052772f58bd657d21ea4 (patch) | |
| tree | aa6ce4f04884df0ebdb8cb6520e562eb5f0daf0e /vendor/Dockerfile/Binary-scratch.Dockerfile | |
| parent | 831054a79d20e7af01106d9b1ac5a18965a51dc8 (diff) | |
| download | gitlab-ce-cherry-pick-ecd49e82.tar.gz | |
Merge branch 'update-9-3-templates' into '9-3-stable'cherry-pick-ecd49e82
Update templates for 9.3
See merge request !12041
Diffstat (limited to 'vendor/Dockerfile/Binary-scratch.Dockerfile')
| -rw-r--r-- | vendor/Dockerfile/Binary-scratch.Dockerfile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/Dockerfile/Binary-scratch.Dockerfile b/vendor/Dockerfile/Binary-scratch.Dockerfile new file mode 100644 index 00000000000..5e2de2ead61 --- /dev/null +++ b/vendor/Dockerfile/Binary-scratch.Dockerfile @@ -0,0 +1,17 @@ +# This Dockerfile installs a compiled binary into an image with no system at all. +# You must either commit your compiled binary into source control (not recommended) +# or build the binary first as part of a CI/CD pipeline. +# Your binary must be statically compiled with no dynamic dependencies on system libraries. +# e.g. for Docker: +# CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . + +FROM scratch + +# Since we started from scratch, we'll likely need to add SSL root certificates +ADD /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ + +WORKDIR /usr/local/bin + +# Change `app` to whatever your binary is called +Add app . +CMD ["./app"] |
