GoogleCloudPlatform/docker-wait

Name: docker-wait

Owner: Google Cloud Platform

Description: null

Created: 2016-03-03 19:14:47.0

Updated: 2018-04-17 21:17:35.0

Pushed: 2016-03-03 19:18:57.0

Homepage: null

Size: 5

Language: C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Lightweight Docker wait tool

docker-wait is a C program that waits for a docker container to exit. The docker built-in command docker wait takes at least 20MB memory, while this tiny program only consumes 7K memory if compiled statically. It will consumes about 700K memory if compiled dynamically, but the binary size is smaller. This will save the baseline memory for services running on container-optimized operating system.

How to build the tool

You can install any GCC compiler and compiled the program statically using the following command:

-static -O3 -o docker-wait docker-wait.c
How to run the tool
er-wait CONTAINER_NAME

This program connects to the default docker socket file /var/run/docker.sock. But you can override the default value by setting environment variable DOCKER_SOCKET_PATH.

Licensing

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.