-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
Dockerfile added to build static files and serve with NGINX image #262
Conversation
Hello @michealch WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested Do you know why this warning appears? |
…upport multi arch.
@satnaing fixed the issue by replacing the distroless image with official nginx unprivileged image. it should work fine now :) The sample image is built for just sample purpose and only compatible with amd64. |
@satnaing i will create another pull request to update readme and add the docker infos to it. Feel free to contact me, if you have any question regarding Docker or Container. |
i have updated runtime image to official nginx image. Please merge the PR. |
@michealch |
@satnaing README updated |
Hey @michealch have you tried to use the docker-compose.yaml? |
Hey @eerison |
This PR includes a Dockerfile and .dockerignore that uses a two-stage build process: building static files with Node.js and serving them via a official NGINX image. The initial build stage uses node:lts to install dependencies and compile the application into static files. Second stage serve the static files with unprivileged NGINX Image.
Key Changes:
Build the Image by executing
docker build -t <image_name>:<image_tag> .
Run the Container by executing
docker run -p 8081:80 <image_name>:<image_tag>
The webpage should be accessible at http://localhost:8081