@@ -4,16 +4,29 @@ FROM registry.suse.com/bci/openjdk:17 AS builder
4
4
ARG TARGETOS
5
5
ARG TARGETARCH
6
6
7
- COPY . /src
7
+ COPY admin /src/admin
8
+ COPY cli /src/cli
9
+ COPY common /src/common
10
+ COPY images /src/images
11
+ COPY licenses /src/licenses
12
+ COPY java.security /src/java.security
13
+ COPY package /src/package
14
+ COPY project /src/project
15
+ COPY scripts /src/scripts
16
+ COPY build.sbt .scalafix.conf .scalafmt.conf /src/
17
+
8
18
WORKDIR /src
9
19
10
20
RUN zypper refresh && \
11
21
zypper install -y ca-certificates wget curl zip git awk nodejs20 npm20
12
22
23
+ ARG VERSION
24
+
25
+ ARG CS_VERSION=v2.1.18
13
26
RUN if [ "$TARGETARCH" = "amd64" ]; then \
14
- curl -fL https://github.com/coursier/launchers/raw/master /cs-x86_64-pc-${TARGETOS}.gz | gzip -d > cs; \
27
+ curl -fL https://github.com/coursier/coursier/releases/download/${CS_VERSION} /cs-x86_64-pc-${TARGETOS}.gz | gzip -d > cs; \
15
28
elif [ "$TARGETARCH" = "arm64" ]; then \
16
- curl -fL https://github.com/VirtusLab/coursier-m1/releases/latest/ download/cs-aarch64-pc-${TARGETOS}.gz | gzip -d > cs; \
29
+ curl -fL https://github.com/VirtusLab/coursier-m1/releases/download/${CS_VERSION} /cs-aarch64-pc-${TARGETOS}.gz | gzip -d > cs; \
17
30
else \
18
31
echo "Unsupported architecture: $ARCH" ; \
19
32
exit 1; \
@@ -25,12 +38,14 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
25
38
RUN npm install -g @angular/cli@14 && \
26
39
npm install -g npm-force-resolutions
27
40
28
- RUN bash build/build_manager.sh
41
+ RUN sed -i -e 's/interim.*xxxx/' "$VERSION" '/g' ./common/src/main/resources/application.conf
42
+ RUN bash package/build_manager.sh
29
43
30
44
# Manager unitest
31
45
RUN if [ "$ARCH" = "amd64" ]; then \
32
46
zypper addrepo https://download.opensuse.org/repositories/M17N:fonts/15.6/M17N:fonts.repo && \
33
- zypper --non-interactive --gpg-auto-import-keys refresh && \
47
+ rpm --import https://download.opensuse.org/repositories/M17N/15.6/repodata/repomd.xml.key && \
48
+ zypper --non-interactive refresh && \
34
49
zypper install -y liberation-fonts && \
35
50
wget https://dl.google.com/${OS}/direct/google-chrome-stable_current_${ARCH}.rpm && \
36
51
wget https://dl.google.com/${OS}/${OS}_signing_key.pub && \
42
57
FROM registry.suse.com/bci/bci-micro:15.6 AS micro
43
58
FROM registry.suse.com/bci/bci-base:15.6 AS base
44
59
45
- COPY --from=builder /src/build /requirements.txt /chroot/requirements.txt
60
+ COPY --from=builder /src/package /requirements.txt /chroot/requirements.txt
46
61
COPY --from=micro / /chroot/
47
62
48
- RUN zypper --installroot /chroot -n --gpg-auto-import-keys in --no-recommends \
63
+ RUN zypper refresh && zypper --installroot /chroot -n in --no-recommends \
49
64
python312 python312-pip iproute2 lsof procps grep awk && \
50
65
cp /etc/resolv.conf /chroot/etc/resolv.conf && \
51
66
chroot /chroot /usr/bin/python3.12 -m pip install --upgrade pip setuptools && \
@@ -77,22 +92,27 @@ ARG COMMIT
77
92
WORKDIR /
78
93
COPY --from=base /chroot/ /
79
94
COPY --from=base /usr/sbin/useradd /usr/sbin
80
- COPY --from=builder /src/stage /
81
95
COPY --from=builder /usr/lib64/ /usr/lib64/
96
+ COPY --from=builder /src/stage /
82
97
83
98
ENV JAVA_HOME=/usr/lib64/jvm/java-17-openjdk-17 \
84
99
PATH=/usr/lib64/jvm/java-17-openjdk-17/bin:$PATH \
85
100
LD_LIBRARY_PATH=/usr/lib64 \
86
101
LANG=C.UTF-8 \
87
102
PYTHONUNBUFFERED=1
88
103
89
- LABEL name="manager" \
90
- vendor="SUSE Security" \
91
- version=${VERSION} \
92
- release=${VERSION} \
93
- neuvector.image="neuvector/manager" \
94
- neuvector.role="manager" \
95
- neuvector.rev="${COMMIT}"
104
+ LABEL "name" ="manager" \
105
+ "vendor" ="SUSE Security" \
106
+ "neuvector.image" ="neuvector/manager" \
107
+ "neuvector.role" ="manager" \
108
+ "neuvector.rev" ="${COMMIT}" \
109
+ "io.artifacthub.package.logo-url" =https://avatars2.githubusercontent.com/u/19367275 \
110
+ "io.artifacthub.package.readme-url" ="https://raw.githubusercontent.com/neuvector/manager/${VERSION}/README.md" \
111
+ "org.opencontainers.image.description" ="SUSE Security Manager" \
112
+ "org.opencontainers.image.title" ="SUSE Security Manager" \
113
+ "org.opencontainers.image.source" ="https://github.com/neuvector/manager/" \
114
+ "org.opencontainers.image.version" ="${VERSION}" \
115
+ "org.opensuse.reference" ="neuvector/manager:${VERSION}"
96
116
97
117
ARG user=manager
98
118
RUN echo "$user:x:1000:1000::/nonexistent:/bin/bash" >> /etc/passwd && \
0 commit comments