cosmosdb-server
cosmosdb-server copied to clipboard
Docker image
Any interest in publishing a docker image for this? I'm using this Dockerfile in an integration testing story via docker-compose and it appears to be working great
That sounds a good idea 👍
Excellent! One open question for me is to set up the GitHub action to publish to the zeit DockerHub. Should I open the PR with only the Dockerfile or can you help me get the necessary permissions to push the Docker image?
@ridhoq sorry for the delay. I think it's great if we can push Docker image via github action, maybe using https://github.com/docker/build-push-action. I think I can prepare the credentials for it. Dockerfile only also is helpful 👍
@nkzawa actually I am having one issue with the docker image - when I run docker run --rm ridhoq/cosmosdb-server:0.7.0
, I am unable to use ctrl+c
to exit the running container. Do you know why that might be? If this is an issue, it may not be a great experience for users...
@ridhoq I think it's because node
doesn't handle signals.
See https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals
A solution is to use tini (https://github.com/krallin/tini#using-tini). Using npm
also seems work according to https://stackoverflow.com/questions/36637912/how-to-stop-running-node-in-docker
@nkzawa You just add signal handling to src/index.ts, like so:
const cleanUp = () => {
// do clean-up stuff
process.exit(0);
};
process.on('SIGINT', cleanUp);
process.on('SIGTERM', cleanUp);
I can make a PR if you want.
Any updates on the Docker image? :)
I am definitely interested in a Docker image for this. Anyone here still working on it?
Sorry I fell off this ticket: I was using this Docker image for a personal project and got sidetracked. This has now come up for a work project so I'd like to get the ball rolling here again.
So the few threads of work remaining here:
- Get the Dockerfile merged: I already have that in my fork of the project so it should be nearly good to go
- Figure out how to publish the Dockerfile to Vercel's Docker Hub registry. @nkzawa said they could help with this. I'd prefer if someone from Vercel could take point on this as we'd want to manage versioning of the Docker images.
- Handle signals like
SIGINT
andSIGTERM
, so we canctrl-c
out of running images, etc. This could prolly be broken out into a separate issue.
Let me know if we're good to proceed with the above work.
Hi all, I just wanted mention in this thread that I made an attempt to address the requirements @ridhoq laid out. Ready and willing to make changes to the PR as needed.
+1 for this one, we would be very interested in using this