-
Notifications
You must be signed in to change notification settings - Fork 164
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
Create Dockerfile #628
Create Dockerfile #628
Conversation
This Dockerfile sets up a multi-stage build for a web application: The first stage compiles the Golang backend code and creates a 'main' binary. The second stage handles frontend asset compilation, specifically converting SCSS to CSS using SASS. Finally, it combines the Golang binary and compiled CSS into a final image, ready to run the web application on port 8080. Signed-off-by: pushpit kamboj <[email protected]>
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 wonder if, instead of a Dockerfile
, we could use buildpacks to build an image? Where do you intend to deploy the image?
|
||
# Copy and build the Golang application | ||
COPY . . | ||
RUN go build -o main ./*.go |
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.
Do we have a go
application at the root level?
RUN go build -o main ./*.go | ||
|
||
# Stage 2: Build frontend assets (SCSS to CSS) | ||
FROM node:latest AS frontend |
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.
Do we have any CSS assets to build?
Do we have any answers to my review queries yet? |
Closing this pending answers to review questions. Please re-open if you want to follow up on this. |
This Dockerfile sets up a multi-stage build for a web application:
The first stage compiles the Golang backend code and creates a 'main' binary.
The second stage handles front-end asset compilation, specifically converting SCSS to CSS using SASS. Finally, it combines the Golang binary and compiled CSS into a final image, ready to run the web application on port 8080.