mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-07-08 04:24:27 +00:00
fix: add extra_files to copy source directories into Docker build context
GoReleaser creates a temporary build context with only binaries, but our Dockerfiles are multi-stage builds that need the full source code to compile. Added extra_files to copy necessary directories. Files copied per image: - gohoarder-server: go.mod, go.sum, cmd, pkg, internal, config - gohoarder-scanner: go.mod, go.sum, cmd, pkg, internal, config - gohoarder-migrate: go.mod, go.sum, cmd, pkg, internal, migrations - gohoarder-frontend: frontend/ directory (Node.js source) - gohoarder-gateway: no extra files needed (static config) This fixes the build context error: "Seems like you tried to copy a file that is not available in the build context."
This commit is contained in:
@@ -146,6 +146,13 @@ dockers_v2:
|
|||||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
extra_files:
|
||||||
|
- go.mod
|
||||||
|
- go.sum
|
||||||
|
- cmd
|
||||||
|
- pkg
|
||||||
|
- internal
|
||||||
|
- config.yaml.example
|
||||||
|
|
||||||
# 2. Website - Frontend Dashboard
|
# 2. Website - Frontend Dashboard
|
||||||
- id: gohoarder-frontend
|
- id: gohoarder-frontend
|
||||||
@@ -167,6 +174,8 @@ dockers_v2:
|
|||||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
extra_files:
|
||||||
|
- frontend
|
||||||
|
|
||||||
# 3. Scanning Engine - Background scanner worker
|
# 3. Scanning Engine - Background scanner worker
|
||||||
- id: gohoarder-scanner
|
- id: gohoarder-scanner
|
||||||
@@ -192,6 +201,13 @@ dockers_v2:
|
|||||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
extra_files:
|
||||||
|
- go.mod
|
||||||
|
- go.sum
|
||||||
|
- cmd
|
||||||
|
- pkg
|
||||||
|
- internal
|
||||||
|
- config.yaml.example
|
||||||
|
|
||||||
# 4. Gateway - Nginx reverse proxy for unified deployment
|
# 4. Gateway - Nginx reverse proxy for unified deployment
|
||||||
- id: gohoarder-gateway
|
- id: gohoarder-gateway
|
||||||
@@ -238,6 +254,13 @@ dockers_v2:
|
|||||||
- "--label=org.opencontainers.image.version={{ .Version }}"
|
- "--label=org.opencontainers.image.version={{ .Version }}"
|
||||||
- "--label=org.opencontainers.image.created={{ .Date }}"
|
- "--label=org.opencontainers.image.created={{ .Date }}"
|
||||||
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
|
||||||
|
extra_files:
|
||||||
|
- go.mod
|
||||||
|
- go.sum
|
||||||
|
- cmd
|
||||||
|
- pkg
|
||||||
|
- internal
|
||||||
|
- migrations
|
||||||
|
|
||||||
# Artifact signing with cosign
|
# Artifact signing with cosign
|
||||||
signs:
|
signs:
|
||||||
|
|||||||
Reference in New Issue
Block a user