Posts

Showing posts with the label docker

Docker Tip: Quick reference of commonly used docker command

// start a container with latest python docker run  // once container shuts down, just remove the container docker --rm // mount host directory to a directly inside of container docker -v ${host_dir}:/dir_inside_container // interactive, basically allow us to interact with something inside the container docker -it i.e. // start a python container and enter python interpreter docker run \ --rm \ -it \ python:latest \ python // -p host_port:container_port takes host_port and forward to container_port // -d run container in background, if not specified, it will run in foreground start container in background if -d is specified // if a container is issued to be run in background, we can stop it by first figuring out the container name then issue docker stop <container name> // check running containers, this will display container id, image, created, status, ports, and names docker ps docker container ls // docker build command docker build \ // -...

MongoDB Quick Note: BI Connector Issue

This is just a quick note of what can stop mongosqld from working properly that I wasn't aware of. Background: My work runs everything mongodb inside of docker containers, so sometimes it's not as straight forward to see immediately of what's preventing your container from working properly What happened: I ran into issue that my container does not stay up after I updated my drdl to reflect new fields introduced to the underlying collection. How to debug: Go to the host server, copy out entrypoint.sh and add sleep 100000000 to before mongosqld is executed. This force the container to stay up for us to look into issue. Cause of the issue: When I updated the drdl, I used tab instead of space, which is causing the mongsqld to error out Fix: Just replace tab with space and everything is back to normal