Browse Source

Add Dockerfile

changes/91/636791/1
Monty Taylor 3 months ago
parent
commit
bab23a5e9b
1 changed files with 39 additions and 0 deletions
  1. 39
    0
      Dockerfile

+ 39
- 0
Dockerfile View File

@@ -0,0 +1,39 @@
1
+# Copyright (C) 2019 Red Hat, Inc.
2
+#
3
+# This program is free software: you can redistribute it and/or modify
4
+# it under the terms of the GNU General Public License as published by
5
+# the Free Software Foundation, either version 3 of the License, or
6
+# (at your option) any later version.
7
+#
8
+# This program is distributed in the hope that it will be useful,
9
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
+# GNU General Public License for more details.
12
+#
13
+# You should have received a copy of the GNU General Public License
14
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
15
+
16
+FROM debian:testing as builder
17
+
18
+RUN mkdir -p /output/bindep
19
+RUN apt-get update && apt-get install -y python3-pip && pip3 install bindep
20
+COPY bindep.txt /bindep.txt
21
+RUN cd / && bindep -l newline > /output/bindep/run.txt
22
+RUN apt-get install -y $(bindep -b compile)
23
+COPY . /src
24
+RUN cd /src \
25
+  && autoreconf -fi \
26
+  && ./configure \
27
+  && make \
28
+  && make install
29
+
30
+FROM debian:testing
31
+
32
+COPY --from=builder /output/bindep/run.txt /run.txt
33
+RUN apt-get update \
34
+  && apt-get install -y dumb-init $(cat /run.txt) \
35
+  && apt-get clean \
36
+  && rm -rf /var/lib/apt/lists/* /run.txt
37
+COPY --from=builder /usr/local /usr/local
38
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
39
+CMD ["/usr/local/bin/zuul-preview"]

Loading…
Cancel
Save