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

chore(docker): fix binary path for dockerfiles #2177

Merged
merged 4 commits into from
May 28, 2024
Merged

Conversation

albttx
Copy link
Member

@albttx albttx commented May 23, 2024

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 albttx self-assigned this May 23, 2024
@albttx albttx requested a review from a team as a code owner May 23, 2024 14:30
@albttx albttx requested review from zivkovicmilos and petar-dambovaliev and removed request for a team May 23, 2024 14:30
@zivkovicmilos zivkovicmilos requested a review from ajnavarro May 23, 2024 14:47
@ajnavarro
Copy link
Contributor

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

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane enough to me, @ajnavarro if you can give a second look 👀

@moul
Copy link
Member

moul commented May 27, 2024

+1 for alpine instead of busybox.

Copy link

codecov bot commented May 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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%) ⬆️
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%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@albttx
Copy link
Member Author

albttx commented May 27, 2024

I just made some small but i believe important modifications.

I still believe for multiple reasons that the Dockerfile in the PR #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 chore(ci): CI test of portal-loop #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

@ajnavarro
Copy link
Contributor

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

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

@albttx
Copy link
Member Author

albttx commented May 28, 2024

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*

@thehowl thehowl merged commit 3cc4952 into master May 28, 2024
79 checks passed
@thehowl thehowl deleted the fix/dockerfiles branch May 28, 2024 14:12
omarsy pushed a commit to TERITORI/gno that referenced this pull request Jun 3, 2024
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

<details><summary>Contributors' checklist...</summary>

- [ ] 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](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants