From 16db0f9cf6d176e2ea49a35dcebe198fd3b5cb0b Mon Sep 17 00:00:00 2001 From: Kevin Sapper Date: Fri, 13 Mar 2020 22:50:22 +0100 Subject: [PATCH] Problem: Dockerfile has no proper entrypoint Solution: Write a script that can be called when docker runs the image --- Dockerfile | 6 ++++-- packaging/docker/run_zproject.sh | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 packaging/docker/run_zproject.sh diff --git a/Dockerfile b/Dockerfile index a100261c..5a2fb2f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ MAINTAINER ZeroMQ community RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes build-essential autoconf automake libtool pkg-config +COPY packaging/docker/run_zproject.sh /usr/local/bin/run_zproject.sh + COPY . /tmp/zproject -RUN mkdir -p /tmp/myproject && cd /tmp/zproject && ( ./autogen.sh; ./configure; make; make install; ldconfig ) && \ - rm -rf /tmp/myproject && rm -rf /tmp/zproject +RUN cd /tmp/zproject && ( ./autogen.sh; ./configure; make; make install; ldconfig ) && rm -rf /tmp/zproject +ENTRYPOINT ["run_zproject.sh"] diff --git a/packaging/docker/run_zproject.sh b/packaging/docker/run_zproject.sh new file mode 100755 index 00000000..0f25b58c --- /dev/null +++ b/packaging/docker/run_zproject.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# $BUILD_DIR points to directory holding sources +BUILD_DIR=${BUILD_DIR-.} +cd "$BUILD_DIR" || exit 1 +gsl project.xml