Dockerize http-server
Dockerization of http-server
Relevant issues
Closes #724
Contributor checklist
- [ ] Provide tests for the changes (unless documentation-only)
- [x] Documented any new features, CLI switches, etc. (if applicable)
- [ ] Server
--helpoutput - [x] README.md
- [x] doc/http-server.1 (use the same format as other entries)
- [ ] Server
- [x] The pull request is being made against the
masterbranch
Maintainer checklist
- [ ] Assign a version triage tag
- [ ] Approve tests if applicable
Maintainers will do the building, tagging and pushing docker images. These instructions are only for maintainers to release a new version in docker hub;
Building and Tagging the Docker Image
- Make sure to checkout the desired version/branch before building docker image for that version
- Run
docker build -t {your-username}/http-server:{new-version} -t {your-username}/http-server:latest .in project root folder. This builds and tags the docker image with "latest" tag and also with the version you provide.
Pushing the Docker Image
- After successful build, you can push all tags to your docker repository
- Push the version tag:
docker push {your-username}/http-server:{new-version} - Push the "latest" tag:
docker push {your-username}/http-server:latest
Note: I already have the http-server images built in docker hub in my own repository (which is tozlu/http-server), if you would like to maintain docker images in your own repository, please change README and the build/push scripts above to reflect your username for docker hub.
@mtozlu Have you try running the final bin with Google Distroless images?
FROM gcr.io/distroless/nodejs:16
@gaby No. But it looks cool. Should I switch to it? What are the benefits over alpine?
@gaby No. But it looks cool. Should I switch to it? What are the benefits over alpine?
If it runs fine, I would say yes.