Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile and docker run command for binary build #3761

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mkhgkk
Copy link

@Mkhgkk Mkhgkk commented Sep 12, 2024

Error:

- LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 8)
docker run --rm -v :/out \
temp sh -c "rm -rf /out/binaries && cp -r /s/binaries /out/"
docker: invalid spec: :/out: empty section between colons.
See 'docker run --help'.
make: *** [scripts/binaries.mk:65: binaries] Error 125

This pull request addresses the two issues in the binaries.mk file that prevent the proper building of binaries using Docker:

  1. Legacy ENV format: The Dockerfile was using the legacy ENV key value format, which results in a warning. The newer ENV key=value format is recommended. This PR updates the line to follow the new format: Changed ENV CGO_ENABLED 0 to ENV CGO_ENABLED=0.

  2. Empty section in volume mount path: The docker run command was using an invalid volume mount syntax, leading to an "empty section between colons" error. The $(PWD) macro was replaced with $(shell pwd) to correctly reference the current working directory.

Testing: After making these changes, I was able to successfully build the binaries using the provided instructions without encountering the errors mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant