forked from skupperproject/skupper-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
73 lines (62 loc) · 2.58 KB
/
Containerfile
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
63
64
65
66
67
68
69
70
71
72
73
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest as builder
RUN microdnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
rpm-build \
gcc gcc-c++ make cmake pkgconfig \
cyrus-sasl-devel openssl-devel libuuid-devel \
python3-devel python3-pip \
libnghttp2-devel \
wget tar patch findutils git \
libtool \
&& microdnf clean all -y
WORKDIR /build
COPY . .
ENV PROTON_VERSION=main
ENV PROTON_SOURCE_URL=${PROTON_SOURCE_URL:-https://github.com/apache/qpid-proton/archive/${PROTON_VERSION}.tar.gz}
ENV LWS_VERSION=v4.3.2
ENV LIBUNWIND_VERSION=v1.6.2
ENV LWS_SOURCE_URL=${LWS_SOURCE_URL:-https://github.com/warmcat/libwebsockets/archive/refs/tags/${LWS_VERSION}.tar.gz}
ENV LIBUNWIND_SOURCE_URL=${LIBUNWIND_SOURCE_URL:-https://github.com/libunwind/libunwind/archive/refs/tags/${LIBUNWIND_VERSION}.tar.gz}
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
ARG VERSION=0.0.0
ENV VERSION=$VERSION
RUN .github/scripts/compile.sh
RUN tar zxpf /qpid-proton-image.tar.gz --one-top-level=/image && tar zxpf /skupper-router-image.tar.gz --one-top-level=/image && tar zxpf /libwebsockets-image.tar.gz --one-top-level=/image && tar zxpf /libunwind-image.tar.gz --one-top-level=/image
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
RUN microdnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
glibc \
cyrus-sasl-lib cyrus-sasl-plain cyrus-sasl-gssapi openssl \
python3 \
libnghttp2 \
gettext hostname iputils \
shadow-utils \
&& microdnf clean all
RUN useradd --uid 10000 runner
USER 10000
WORKDIR /
COPY --from=builder /image /
WORKDIR /home/skrouterd/etc
WORKDIR /home/skrouterd/bin
COPY ./scripts/* /home/skrouterd/bin/
ARG version=latest
ENV VERSION=${version}
ENV QDROUTERD_HOME=/home/skrouterd
EXPOSE 5672 55672 5671
CMD ["/home/skrouterd/bin/launch.sh"]