mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
Merge branch 'master' into github-enterprise
This commit is contained in:
commit
9ddf723c4e
@ -164,13 +164,14 @@ type Checksum struct {
|
||||
|
||||
// Docker image config
|
||||
type Docker struct {
|
||||
Binary string `yaml:",omitempty"`
|
||||
Goos string `yaml:",omitempty"`
|
||||
Goarch string `yaml:",omitempty"`
|
||||
Goarm string `yaml:",omitempty"`
|
||||
Image string `yaml:",omitempty"`
|
||||
Dockerfile string `yaml:",omitempty"`
|
||||
Latest bool `yaml:",omitempty"`
|
||||
Binary string `yaml:",omitempty"`
|
||||
Goos string `yaml:",omitempty"`
|
||||
Goarch string `yaml:",omitempty"`
|
||||
Goarm string `yaml:",omitempty"`
|
||||
Image string `yaml:",omitempty"`
|
||||
Dockerfile string `yaml:",omitempty"`
|
||||
Latest bool `yaml:",omitempty"`
|
||||
Files []string `yaml:"extra_files,omitempty"`
|
||||
|
||||
// Capture all undefined fields and should be empty after loading
|
||||
XXX map[string]interface{} `yaml:",inline"`
|
||||
|
@ -52,6 +52,10 @@ dockers:
|
||||
dockerfile: Dockerfile
|
||||
# Also tag and push myuser/myimage:latest
|
||||
latest: true
|
||||
# If your dockerfile copies more files other than the binary itself,
|
||||
# you should list them here as well.
|
||||
extra_files:
|
||||
- config.yml
|
||||
```
|
||||
|
||||
These settings should allow you to generate multiple docker images, using
|
||||
|
@ -5,7 +5,7 @@ title: Links
|
||||
- Follow the progress on [GitHub repository](https://github.com/goreleaser/goreleaser)
|
||||
- Follow [@caarlos0](https://twitter.com/caarlos0) on Twitter for updates
|
||||
- [Slack](https://gophers.slack.com/messages/goreleaser/) to chat about GoReleaser,
|
||||
quetions and etc. Join using [this link](https://invite.slack.golangbridge.org/).
|
||||
questions and etc. Join using [this link](https://invite.slack.golangbridge.org/).
|
||||
- [Contributing Guidelines](https://github.com/goreleaser/goreleaser/blob/master/CONTRIBUTING.md)
|
||||
|
||||
This project adheres to the Contributor Covenant
|
||||
|
@ -71,6 +71,11 @@ func process(ctx *context.Context, folder string, docker config.Docker, binary c
|
||||
if err := os.Link(docker.Dockerfile, dockerfile); err != nil {
|
||||
return errors.Wrap(err, "failed to link dockerfile")
|
||||
}
|
||||
for _, file := range docker.Files {
|
||||
if err := os.Link(file, filepath.Join(root, filepath.Base(file))); err != nil {
|
||||
return errors.Wrapf(err, "failed to link extra file '%s'", file)
|
||||
}
|
||||
}
|
||||
if err := dockerBuild(root, dockerfile, image); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user