Skip to content

docs: Add replace dockerfile with Go guide - #4173

Merged
vikram-dagger merged 3 commits into
dagger:mainfrom
vikram-dagger:3426-replace-dockerfile-go-guide
Jan 6, 2023
Merged

vikram-dagger merged 3 commits into
dagger:mainfrom
vikram-dagger:3426-replace-dockerfile-go-guide

Conversation

@vikram-dagger

@vikram-dagger vikram-dagger commented Dec 13, 2022 •

Copy link
Copy Markdown
Contributor

This commit adds a guide that explains how to replace a Dockerfile with a Dagger pipeline written in Go. It uses
the Dockerfile for the memcached open-source project.

Closes #3426

Signed-off-by: Vikram Vaswani [email protected]

@vikram-dagger
vikram-dagger marked this pull request as draft December 13, 2022 10:13

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copyright/legal question here. Is it OK to copy the source Dockerfile into our tutorial? I've not done it right now out of caution, instead linking to the source commit ID (which is fine except that the user needs an extra click to see it).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Update: I think it's better to link to it, so I'll leave this as is unless there are strong feelings that it should change (eg. to make the tutorial easier to follow)

@vikram-dagger
vikram-dagger force-pushed the 3426-replace-dockerfile-go-guide branch 3 times, most recently from 3fb5f93 to 5fb25ba Compare December 15, 2022 08:06
@vikram-dagger vikram-dagger self-assigned this Dec 15, 2022
This commit adds a guide that explains how to replace a Dockerfile
with a Dagger pipeline written in Go. It uses
the Dockerfile for the memcached open-source project.

Signed-off-by: Vikram Vaswani <[email protected]>
@vikram-dagger
vikram-dagger force-pushed the 3426-replace-dockerfile-go-guide branch from 5fb25ba to ce47bb4 Compare December 15, 2022 08:16
@vikram-dagger
vikram-dagger marked this pull request as ready for review December 15, 2022 08:19

@kpenfound kpenfound left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Content looks good! How do you feel about the 3 functions in the snippet? Do you feel that it makes the code easier to follow? The goal was to make the main function's logical steps easy to read with the details pulled away a bit

@vikram-dagger

vikram-dagger commented Jan 5, 2023 •

Copy link
Copy Markdown
Contributor Author

Content looks good! How do you feel about the 3 functions in the snippet? Do you feel that it makes the code easier to follow? The goal was to make the main function's logical steps easy to read with the details pulled away a bit

The functions do make it clearer. I personally found the division of code between main() and other functions a bit inconsistent ie. I wondered why we didn't also have setEnvVars() and setEntrypoint() custom functions (or include those steps in the existing functions). Maybe that could be an improvement for future?

@jpadams jpadams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! We should def publish this and get feedback. Do we have a way to easily collect that from guides @vikram-dagger via a link/form/issue-template??

I know some users have asked for more real world guides, so this is great!

@vikram-dagger
vikram-dagger merged commit 08d0e85 into dagger:main Jan 6, 2023
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.

Replace your Dockerfile with go Guide + Demo Video

3 participants