-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce multi-platform builds #334
This commit extends the base Dockerfile so that it can copy a binary from an arbitrary path and copy it into a target one inside the filesystem of the container image. The scripts building the component binaries and containers have also been extended with environment variables to help them build the binaries for the expected architecture. The Makefile has acquired also the same environment variable which are set by default in the host's architecture. In the case of the `dev-deploy` target, the architecture is set by default to `linux/amd64` since containers are usually executed on linux/amd64 systems or on linux/amd64 VMs running the Docker daemon (Windows, some Macs) or on VMs running linux/arm64 which supports amd64 binaries out of the box.
- Loading branch information
Showing
7 changed files
with
78 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
ARG BASE_MIGRATION_IMAGE | ||
|
||
FROM ${BASE_MIGRATION_IMAGE:-scratch} | ||
|
||
ARG GOOS=linux | ||
ARG GOARCH=amd64 | ||
|
||
LABEL org.opencontainers.image.description="Draconctl is a command line tool for interacting with Dracon, you can find documentation for it at github.com/ocurity/dracon" | ||
|
||
COPY ./bin/cmd/draconctl /bin/draconctl | ||
COPY ./bin/cmd/${GOOS}/${GOARCH}/draconctl /bin/draconctl | ||
COPY ./pkg/enrichment/migrations /etc/dracon/migrations/enrichment | ||
|
||
ENTRYPOINT ["/bin/draconctl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters