Build FIPS capable executables in a docker container #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The same commands (
build.sh <arch> build
) as before now build atelegraf
executable for the following architectures inside a docker container; a relatively recent docker installation must be present on the build machine.arm64
andx86_64
- FIPS, dynamically linked to useOpenSSL
for cryptoarm
andMIPS
- no-FIPS, statically linked to use nativegolang
cryptoAs noted on the
golang-fips
homepage, the binary will run in FIPS mode if:/proc/sys/crypto/fips_enabled
)GOLANG_FIPS=1
is setDetails
golfing
installation on a machine, the standardgolang
container images published on docker hub are used to build inside a container.golang
complier (e.g. by setting theGOARCH
), a platform appropriategolang
docker container is instantiated (using thedocker
option--platform
) for the build.Dockerfile
for details).golang-fips
is used:golang
toolchain withgolang-fips
included is first built.Testing
string
,ldd
andstrace
were used on a build server, to verify thex86_64
binary was usingOpenSSL
.telegraf
binary and runningtelegraf --version
.Checklist
Related issues
EXOS-37069