From 208c88dbe72a3aa78e857183834f29cbfaa141a6 Mon Sep 17 00:00:00 2001 From: Robert Pajak Date: Sat, 13 Jun 2020 12:43:19 +0000 Subject: [PATCH] Fix Dockerfile --- .goreleaser.yml | 2 +- Dockerfile | 5 ++--- README.md | 6 ++++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 6e7b20c..e0726e0 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -28,4 +28,4 @@ dockers: - "--label=org.opencontainers.image.name={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" - "--label=org.opencontainers.image.version={{.Version}}" - - "--build-arg=BINARY={{ .ProjectName }}" + - "--label=org.opencontainers.image.source={{.GitURL}}" diff --git a/Dockerfile b/Dockerfile index c507399..9cf7253 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ FROM scratch -ARG BINARY -COPY $BINARY / -ENTRYPOINT ["/$BINARY"] +COPY seed / +ENTRYPOINT ["/seed"] diff --git a/README.md b/README.md index 5d82328..fdd18d5 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,16 @@ It includes: 1. Click the `Use this template` button (alt. clone or download this repository). 1. Replace all occurences of `golang-templates/seed` to `your_org/repo_name` in all files. +1. Replace all occurences of `seed` to `repo_name` in [Dockerfile](Dockerfile). 1. Change [LICENSE](LICENSE) and [README.md](README.md). -### Build +## Build - Terminal: `make` to get help for make targets. - Terminal: `make all` to execute a full build. - Visual Studio Code: `Terminal` → `Run Build Task... (CTRL+ALT+B)` to execute a fast build. -### Maintainance +## Maintainance Remember to update Go version in [.github/workflows](.github/workflows), [Makefile](Makefile) and [devcontainer.json](.devcontainer/devcontainer.json). @@ -45,6 +46,7 @@ Notable files: - [.vscode](.vscode) - Visual Studio Code configuration files - [.golangci.yml](.golangci.yml) - golangci-lint configuration - [.goreleaser.yml](.goreleaser.yml) - GoReleaser configuration +- [Dockerfile](Dockerfile) - Dockerfile used by GoReleaser to create a container image - [install.sh](install.sh) - build tools installation script - [Makefile](Makefile) - Make targets used for development, [CI build](.github/workflows) and [.vscode/tasks.json](.vscode/tasks.json)