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

📚 Doc: added guide how to build docker image with fiber #2759

Closed
wants to merge 3 commits into from

Conversation

etroynov
Copy link

Description

I am a Golang programming mentor. In my lessons I use your wonderful framework and often my students wonder how to dockerize the end result. They are trying to find this information on Google because it is not on the official website. For this reason I created this tutorial, I hope you will like it.

Type of change

  • This change requires a documentation update

Checklist:

  • For new functionalities I follow the inspiration of the express js framework and built them similar in usage
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation - /docs/ directory for https://docs.gofiber.io/
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If new dependencies exist, I have checked that they are really necessary and agreed with the maintainers/community (we want to have as few dependencies as possible)
  • I tried to make my code as fast as possible with as few allocations as possible
  • For new code I have written benchmarks so that they can be analyzed and improved

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md

Copy link

welcome bot commented Dec 11, 2023

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

docs/guide/docker.md Outdated Show resolved Hide resolved
docs/guide/docker.md Show resolved Hide resolved
docs/guide/docker.md Outdated Show resolved Hide resolved
docs/guide/docker.md Show resolved Hide resolved
docs/guide/docker.md Outdated Show resolved Hide resolved
@etroynov etroynov requested a review from gaby December 12, 2023 12:55
sidebar_position: 8
---

After we have completed the development of our application, the moment comes when we want to upload it to the real world, most often we use Docker for this, wrapping our application in a container.
Copy link
Member

Choose a reason for hiding this comment

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

Packaging instead of Wrapping. This paragraph could use some work.

Copy link
Author

Choose a reason for hiding this comment

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

Sry, english is not my native language and I'm not sure what I get an idea. Can you give me an example?

Copy link
Member

Choose a reason for hiding this comment

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

The paragraph is more suited for a blog or medium, not the documentation of a library

docs/guide/docker.md Outdated Show resolved Hide resolved
docs/guide/docker.md Outdated Show resolved Hide resolved
CMD ["./server"]
```

:::info
Copy link
Member

Choose a reason for hiding this comment

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

I'd say remove everything below this line, except the last step about running it.

Copy link
Author

Choose a reason for hiding this comment

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

I agree with you if we are talking about experienced developers (3-5 years of experience) but I tried to cover as large a group of developers as possible.

For example, I wouldn’t read such a section at all because I have a lot of experience with compiled languages and Docker and I can write a config using Docker documentation, but many people who studied with me usually only knew the general principles and how to run containers.

They did not know how to assemble containers and what two-stage assembly is, etc. By adding this information here, I want to close all possible questions. Because otherwise they will ask them here in "Discuss" or in stackoverflow.

Copy link
Member

@gaby gaby Dec 15, 2023

Choose a reason for hiding this comment

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

Yeah, but they should read Docker Docs. It's not GoFiber job to teach Docker.

If you want, add a note about learning more about Docker / Multistage builds from here: https://docs.docker.com/build/building/multi-stage/

docs/guide/docker.md Outdated Show resolved Hide resolved
Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

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

Added more comments

@ReneWerner87
Copy link
Member

@etroynov could you solve the review comments

@etroynov
Copy link
Author

@ReneWerner87 sure!

@etroynov etroynov requested a review from gaby December 15, 2023 00:10
@etroynov etroynov closed this Dec 17, 2023
@etroynov
Copy link
Author

etroynov commented Dec 17, 2023

@gaby

Unfortunately, you and I have a radically opposite vision of how this article should look, because my experience suggests that such a strong reduction will lead to understatement and, as a result, additional questions, and in some moments I don’t understand what you mean.

Perhaps someone in the future will be able to complete this article, but I’m closing it. Since the end result is clearly not what I had in mind initially and I would not want people to read this article and not find additional information and think that the instructions were made in a hurry.

Without any negativity, but it seems to me that the current interaction looks as if you already have a vision in your head of what this article should look like and are reworking the current one into it, in this case it will be easier if you take the current work and edit them as it will be more correct according to your opinion.

P.S. Just for info look how laravel with laracasts grow their community.

@gaby
Copy link
Member

gaby commented Dec 17, 2023

@etroynov All I asked is for a link to Docker's official documentation for anything Docker related. The official documentation explains really well what/how/why multistage builds are done. If we start writing our own thing it will get outdated and lead to people opening tickets because what we wrote in the guide is no longer valid.

@etroynov
Copy link
Author

etroynov commented Dec 18, 2023

@gaby

As far as I know, the Docker documentation does not contain recipes for specific technologies and many developers noted its difficulty for beginners, but only general information about dockerization and a couple of basic examples.

Generally, people learning development (and this includes me) just want simple dockerization instructions so they can get results here and now and continue learning. How many people do you think will graduate if, after they create a simple CRUD application, I tell them: "Okay, now that you have created a simple application, you need to wrap it in a container, but to do this you need to read all the docker information, it will only take about 5-8 hours.”

Statistics show that in such cases, from 50% to 80% of students quit their studies because it is difficult.

Therefore, this article is written in a way that will suit both beginners and professionals (although I'm sure 90% of them won't need it).

The option you propose is designed for mid- and high-level developers and discards those who have just arrived, although according to statistics they are the ones who most often read the documentation.

For example, let's say you use Documentosaurus to create documentation. Please note that they use the eli5 approach to explain their technology, this is done specifically with the expectation of reaching the entire possible audience and not just pros.

As for your concern about documentation becoming outdated, this is a normal phenomenon and there is also a date for this and it is located in the guides section, which indicates that this is not part of the API but just some kind of instruction. Well, there is always us, the community, yes it will become outdated, someone will see it and create a ticket, another person will come and correct it (maybe it will be me or someone like me) this is exactly how the open source community works.

@etroynov
Copy link
Author

@gaby

Special respect to you for the speed of your response, this is a rarity in the open source community and it is worthy of respect.

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

Successfully merging this pull request may close these issues.

4 participants