-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
63 lines (49 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM ubuntu:20.04 as build
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
python3-dev \
git \
curl \
tar \
build-essential \
&& rm -rf /var/lib/apt/lists/*
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
RDTAR="IBM-MQC-Redist-LinuxX64.tar.gz" \
VRMF=9.2.5.0
RUN mkdir -p /opt/mqm && cd /opt/mqm \
&& curl -LO "$RDURL/$VRMF-$RDTAR" \
&& tar -zxf ./*.tar.gz \
&& rm -f ./*.tar.gz
RUN mkdir /src \
&& cd /src \
&& git clone https://github.com/sensepost/punch-q.git
WORKDIR /src/punch-q
RUN mkdir wheels \
&& pip3 wheel -w wheels/ -r requirements.txt
# --
FROM ubuntu:20.04
ENV LD_LIBRARY_PATH=/opt/mqm/lib64
COPY --from=build /opt/mqm /opt/mqm
COPY --from=build /src/punch-q /src/punch-q
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
# Cleanup some files we dont need here
RUN cd /opt/mqm \
&& rm -Rf gskit8/lib java samp bin inc
WORKDIR /src/punch-q
RUN pip3 install . -f wheels/ \
&& rm -Rf /src
VOLUME [ "/data" ]
ENTRYPOINT [ "/usr/local/bin/punch-q" ]