-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add dockerfile #56
Add dockerfile #56
Conversation
main.go
Outdated
@@ -15,6 +15,7 @@ import ( | |||
|
|||
var ( | |||
port = flag.Int("port", 4001, "The server port") | |||
ip = flag.String("ip", "localhost", "The server IP") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's more common to use host
as the name of the hostname parameter.
Dockerfile
Outdated
|
||
# Run | ||
ENTRYPOINT [ "/durabletask-go" ] | ||
CMD [ "--ip", "0.0.0.0" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make the port number explicit here too since we're hardcoding EXPOSE 4001
?
Dockerfile
Outdated
@@ -0,0 +1,15 @@ | |||
# syntax=docker/dockerfile:1 | |||
|
|||
FROM golang:1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a multi-stage Dockerfile:
- Stage one, from “golang:1.21-alpine” just builds the container
- Stage 2 is the production stage and it’s based on distroless.
Example: https://github.com/GoogleContainerTools/distroless/blob/main/examples/go/Dockerfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this! Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with these changes once @ItalyPaleAle's comments are resolved.
Add dockerfile