gno icon indicating copy to clipboard operation
gno copied to clipboard

chore(docker): fix binary path for dockerfiles

Open albttx opened this issue 1 year ago • 1 comments

Some minor modification on the docker images to simplify working with it.

I would love to have alpine based image, but this could come in a second time, we could have the same images but with a -alpine at the end of the tags if you don't want it by default

Contributors' checklist...
  • [ ] Added new tests, or not needed, or not feasible
  • [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [ ] Updated the official documentation or not needed
  • [ ] No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • [ ] Added references to related issues and PRs
  • [ ] Provided any useful hints for running manual tests
  • [ ] Added new benchmarks to generated graphs, if any. More info here.

albttx avatar May 23 '24 14:05 albttx

@albttx I'm totally fine to move the actual images to alpine if they will simply your workflows

ajnavarro avatar May 23 '24 16:05 ajnavarro

+1 for alpine instead of busybox.

moul avatar May 27 '24 13:05 moul

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 49.91%. Comparing base (8de4c31) to head (7624048). Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2177      +/-   ##
==========================================
- Coverage   49.91%   49.91%   -0.01%     
==========================================
  Files         576      576              
  Lines       77820    77820              
==========================================
- Hits        38847    38846       -1     
- Misses      35843    35846       +3     
+ Partials     3130     3128       -2     
Flag Coverage Δ
contribs/gnodev 24.18% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
contribs/gnokeykc 0.00% <ø> (ø)
contribs/gnomd 0.00% <ø> (ø)
gno.land 61.62% <ø> (ø)
gnovm 44.90% <ø> (+0.01%) :arrow_up:
misc/autocounterd 0.00% <ø> (ø)
misc/genproto 0.00% <ø> (ø)
misc/genstd 73.90% <ø> (ø)
misc/goscan 0.00% <ø> (ø)
misc/logos 17.38% <ø> (ø)
misc/loop 0.00% <ø> (ø)
tm2 54.54% <ø> (-0.02%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 27 '24 18:05 codecov[bot]

I just made some small but i believe important modifications.

I still believe for multiple reasons that the Dockerfile in the PR https://github.com/gnolang/gno/pull/2199 is necessary. This 2 PRs are solving different issues.

Docker is not only for production images, but also for dev. Personally I am using docker locally and i exec locally

docker build -t ghcr.io/gnolang/gno .

to test my code updates and i believe some other devs would like this.

This is why i suggest to have 2 Dockerfiles:

  • from this PR, Dockerfile.release which will be trigger from goreleaser, compile the go code with the go toolchain and copy the binary inside the docker image.

  • From !2199 Dockerfile which could be use for devs, and other purposes (eg: on https://github.com/gnolang/gno/pull/2064 i require a dockerfile that build my docker image to test the portal loop on the CI).

Ps: a really annoying thing is that i'm not able to locally test this PR ... :/

cc: @moul @ajnavarro @zivkovicmilos

albttx avatar May 27 '24 19:05 albttx

@albttx you can locally run goreleaser locally and test that everything is going well:

goreleaser release --snapshot --clean --config .github/goreleaser.yaml --verbose

ajnavarro avatar May 28 '24 12:05 ajnavarro

goreleaser release --snapshot --clean --config .github/goreleaser.yaml --verbose
  • verbose output enabled
  • starting release...
  ⨯ release failed after 0s                  error=yaml: unmarshal errors:
  line 498: field nightly not found in type config.Project

It's impossible to test locally without a token*

albttx avatar May 28 '24 13:05 albttx