From d347532c961b0d7f8d6fec4fb1a8d55292415840 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 13 May 2019 17:43:11 +0200 Subject: [PATCH] Change docker entry point script to allow additional commands (#403) * Change docker entry point script to allow additional commands * Delete Dockerfile --- .azure/Dockerfile | 25 ------------------------- scripts/entry.sh | 8 +++++++- 2 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 .azure/Dockerfile diff --git a/.azure/Dockerfile b/.azure/Dockerfile deleted file mode 100644 index a2bfc7e65..000000000 --- a/.azure/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM ubuntu:18.04 - -# Set shell -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# Docker -RUN apt-get update && apt-get install -y --no-install-recommends \ - apt-transport-https \ - ca-certificates \ - curl \ - gpg-agent \ - software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ - && apt-get update && apt-get install -y --no-install-recommends \ - docker-ce \ - && rm -rf /var/lib/apt/lists/* - -# Build Tools -RUN apt-get update && apt-get install -y --no-install-recommends \ - wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev sudo \ - git make g++ file perl bash binutils locales qemu-utils bison flex \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /build diff --git a/scripts/entry.sh b/scripts/entry.sh index ca46d5480..f14ac2269 100755 --- a/scripts/entry.sh +++ b/scripts/entry.sh @@ -4,4 +4,10 @@ set -e # Run dockerd dockerd -s vfs &> /dev/null & -exec bash +if CMD="$(command -v "$1")"; then + shift + exec "$CMD" "$@" +else + echo "Command not found: $1" + exit 1 +fi