Skip to content

Commit 16db0f9

Browse files
committed
Problem: Dockerfile has no proper entrypoint
Solution: Write a script that can be called when docker runs the image
1 parent c4b704b commit 16db0f9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ MAINTAINER ZeroMQ community
55
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q
66
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes build-essential autoconf automake libtool pkg-config
77

8+
COPY packaging/docker/run_zproject.sh /usr/local/bin/run_zproject.sh
9+
810
COPY . /tmp/zproject
9-
RUN mkdir -p /tmp/myproject && cd /tmp/zproject && ( ./autogen.sh; ./configure; make; make install; ldconfig ) && \
10-
rm -rf /tmp/myproject && rm -rf /tmp/zproject
11+
RUN cd /tmp/zproject && ( ./autogen.sh; ./configure; make; make install; ldconfig ) && rm -rf /tmp/zproject
12+
ENTRYPOINT ["run_zproject.sh"]

packaging/docker/run_zproject.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# $BUILD_DIR points to directory holding sources
4+
BUILD_DIR=${BUILD_DIR-.}
5+
cd "$BUILD_DIR" || exit 1
6+
gsl project.xml

0 commit comments

Comments
 (0)