diff --git a/cron/build/Dockerfile b/cron/build/Dockerfile index 1d9b7d6..c103d74 100644 --- a/cron/build/Dockerfile +++ b/cron/build/Dockerfile @@ -5,14 +5,7 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -## XXXvlab: these should be added by logrotate only -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes netcat-openbsd logrotate && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - COPY ./src/usr/bin/lock /usr/bin/lock -COPY ./src/usr/bin/docker-send-signal /usr/bin/docker-send-signal COPY ./src/usr/bin/docker-17.06.2-ce /usr/bin/docker COPY ./entrypoint.sh /entrypoint.sh diff --git a/cron/build/src/usr/bin/docker-send-signal b/cron/build/src/usr/bin/docker-send-signal deleted file mode 100755 index 2ca12b3..0000000 --- a/cron/build/src/usr/bin/docker-send-signal +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -exname=$(basename "$0") -usage="$exname [-h|--help] CONTAINER SIGNAL" - -container= -signal= -while [ "$1" ]; do - case "$1" in - "--help"|"-h") - echo "$usage" >&2 - exit 0 - ;; - *) - [ -z "$container" ] && { container=$1 ; shift ; continue ; } - [ -z "$signal" ] && { signal=$1 ; shift ; continue ; } - echo "Unexpected argument '$1'." >&2 - exit 1 - ;; - esac - shift -done - -if [ -z "$container" ]; then - echo "You must provide a container name/id as first argument." >&2 - echo "$usage" >&2 - exit 1 -fi - -if [ -z "$signal" ]; then - echo "You must provide a signal to send to $container aargument." >&2 - echo "$usage" >&2 - exit 1 -fi - -container_id="$(docker inspect --format="{{ .Id }}" "$container")" - -echo -e "POST /containers/$container_id/kill?signal=$signal HTTP/1.0\r\n" | nc -U /var/run/docker.sock