Inspiration
- The plethora of tedious docker CLI commands required to run an updated container:
docker stop
,docker rm
,docker pull
,docker run
. To cleanup redundant images, againdocker rmi -f
. - The curiosity behind the Docker architecture and engine and the engine APIs exposed that could possibly be used to build a developer experience tool.
What it does
Argus automates the process of updating the Docker container on the basis of the latest image available image locally or in your image registry. Let's assume the developer is publishing new versions of a Docker image consistently for an application that is deployed and running in Docker containers on the local/remote servers. In this case, the developer needs a way to propogate this image change to somehow the remote servers, but that's not all. Even after secure shell access into these servers, the developer needs to stop the existing container, docker pull the latest image and start the container with original configs and the new image as the base image within the server shell. This requires multiple (and often tedious) docker commands on the CLI. Moreover, if they wish to cleanup the out of date images and containers from the server, running pruning commands takes even more commands.
Argus provides a solution to this predicament by automating the process of watching your containers, finding the underlying latest images (if any) locally and on a remote registry, gracefully quitting the running container, running a docker pull and thereafter creating and running a new container with the updated base image. This ensures that the service will keep track of new versions and will automatically update dockerized environments, remote servers in this context.
Getting started
Make sure you're running the Docker engine on your machine
Installation:
git clone https://github.com/VibhorCodecianGupta/Argus
yarn
Production build:
yarn run build
yarn run start
Development:
yarn run dev
How I built it
Used Typescript, Docker Javascript SDK and its type definitions, Jest for writing test suites, and CLI beautifying libraries. Hacking away at weekend nights too.
Challenges I ran into
Development with Typescript, since I'd never built anything in the language except for some minimal experience with Angular. Docker JS SDK, it was really nice and challenging at the same time to explore the SDK and use the correct types. Referring to the SDK types and Docker engine API response models continously and modelling interfaces accordingly was a fun exercise.
Accomplishments that I'm proud of
Figuring out the SDK and the Docker engine API, and programming the entirety of the automation script.
What I learned
Typescript, type checks, Docker, Docker SDK, and writing designed, meticulous code
What's next for Argus
We plan to publish and release Argus. Future goals would be to make it more customizable, enabling user interactions, and open-sourcing it. Enabling choice to select which containers you want to be monitored, support for some private image repository, enabling choice for running new containers with fresh configs as opposed to running them with the same config used by the stale container, and being able to run the service on remote linux servers with exposed Docker engine sockets.
Built With
- docker
- jest
- typescript
Log in or sign up for Devpost to join the conversation.