Fix: .iscontainer is copied from host
- commit
- 3879b3029c08ae13df57c59024d32e356ec0914c
- author
- bnema · · 2023-11-03 09:26 UTC
- parent
- 1ff943a
- signature
- unsigned
3 files · +5 -4
M .goreleaser.yaml +4 -1
| @@ -30,6 +30,8 @@ dockers: | |||
| 30 | 30 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | |
| 31 | 31 | - "--label=org.opencontainers.image.version={{.Version}}" | |
| 32 | 32 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | |
| 33 | + | extra_files: | |
| 34 | + | - .iscontainer | |
| 33 | 35 | - image_templates: | |
| 34 | 36 | - "ghcr.io/bnema/gordon:{{ .Tag }}-arm64" | |
| 35 | 37 | use: buildx | |
| @@ -43,7 +45,8 @@ dockers: | |||
| 43 | 45 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | |
| 44 | 46 | - "--label=org.opencontainers.image.version={{.Version}}" | |
| 45 | 47 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | |
| 46 | - | ||
| 48 | + | extra_files: | |
| 49 | + | - .iscontainer | |
| 47 | 50 | docker_manifests: | |
| 48 | 51 | - name_template: "ghcr.io/bnema/gordon:latest" | |
| 49 | 52 | image_templates: | |
| @@ -30,6 +30,8 @@ dockers: | |||||
| 30 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | 30 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
| 31 | - "--label=org.opencontainers.image.version={{.Version}}" | 31 | - "--label=org.opencontainers.image.version={{.Version}}" | ||
| 32 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | 32 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | ||
| 33 | + | extra_files: | |||
| 34 | + | - .iscontainer | |||
| 33 | - image_templates: | 35 | - image_templates: | ||
| 34 | - "ghcr.io/bnema/gordon:{{ .Tag }}-arm64" | 36 | - "ghcr.io/bnema/gordon:{{ .Tag }}-arm64" | ||
| 35 | use: buildx | 37 | use: buildx | ||
| @@ -43,7 +45,8 @@ dockers: | |||||
| 43 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | 45 | - "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
| 44 | - "--label=org.opencontainers.image.version={{.Version}}" | 46 | - "--label=org.opencontainers.image.version={{.Version}}" | ||
| 45 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | 47 | - "--label=org.opencontainers.image.source=https://github.com/bnema/gordon" | ||
| 46 | - | 48 | + | extra_files: | |
| 49 | + | - .iscontainer | |||
| 47 | docker_manifests: | 50 | docker_manifests: | ||
| 48 | - name_template: "ghcr.io/bnema/gordon:latest" | 51 | - name_template: "ghcr.io/bnema/gordon:latest" | ||
| 49 | image_templates: | 52 | image_templates: | ||
A .iscontainer +0 -0
no textual change.
M Dockerfile +1 -3
| @@ -1,9 +1,7 @@ | |||
| 1 | 1 | # Use a small base image | |
| 2 | 2 | FROM alpine | |
| 3 | 3 | ||
| 4 | - | # Create a custom environment check file | |
| 5 | - | RUN touch /.iscontainer | |
| 6 | - | ||
| 4 | + | COPY .iscontainer / | |
| 7 | 5 | # Copy the compiled binary from your build context into the container | |
| 8 | 6 | COPY gordon / | |
| 9 | 7 | ||
| @@ -1,9 +1,7 @@ | |||||
| 1 | # Use a small base image | 1 | # Use a small base image | ||
| 2 | FROM alpine | 2 | FROM alpine | ||
| 3 | 3 | ||||
| 4 | - | # Create a custom environment check file | 4 | + | COPY .iscontainer / |
| 5 | - | RUN touch /.iscontainer | |||
| 6 | - | ||||
| 7 | # Copy the compiled binary from your build context into the container | 5 | # Copy the compiled binary from your build context into the container | ||
| 8 | COPY gordon / | 6 | COPY gordon / | ||
| 9 | 7 | ||||