forked from kubevirt-manager/kubevirt-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (52 loc) · 2.32 KB
/
Copy pathDockerfile
File metadata and controls
63 lines (52 loc) · 2.32 KB
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
# Copyright 2025 Marcelo Parisi (github.com/feitnomore)
#
# Licensed 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.
# Build Args
ARG KVM_VERSION=nightly
# Node/Angular Builder
FROM docker.io/node:22.5.1-bookworm as builder
ARG KVM_VERSION
ENV KVM_VERSION=${KVM_VERSION}
LABEL org.opencontainers.image.authors="marcelo@feitoza.com.br"
LABEL description="Kubevirt Manager ${KVM_VERSION} - Builder"
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN cd /usr/src/app && \
npm install -g npm@10.8.2 && \
npm run clean && \
npm install -g @angular/cli@18.1.1 && \
npm install
RUN cd /usr/src/app/src/assets/ && \
git clone https://github.com/novnc/noVNC.git
RUN cd /usr/src/app && \
sed -i "s|nightly|${KVM_VERSION}|g" src/app/components/main-footer/main-footer.component.html && \
npm run build
# OAUTH2 IMAGE
FROM quay.io/oauth2-proxy/oauth2-proxy:latest AS oauth2_proxy_downloader
# NGINX Image
FROM docker.io/nginx:1.29-alpine
LABEL org.opencontainers.image.authors="marcelo@feitoza.com.br"
LABEL description="Kubevirt Manager ${KVM_VERSION}"
COPY --from=oauth2_proxy_downloader /bin/oauth2-proxy /bin/oauth2-proxy
COPY --from=oauth2_proxy_downloader /etc/ssl/private/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
RUN mkdir -p /etc/nginx/location.d/ && \
mkdir -p /etc/nginx/oauth.d/
RUN curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin
COPY entrypoint/90-oauth-proxy.sh /docker-entrypoint.d
COPY entrypoint/91-startkubectl.sh /docker-entrypoint.d
COPY conf/default.conf /etc/nginx/conf.d/
COPY conf/gzip.conf /etc/nginx/conf.d/
RUN chmod +x /docker-entrypoint.d/90-oauth-proxy.sh && chmod +x /docker-entrypoint.d/91-startkubectl.sh
COPY --from=builder /usr/src/app/dist/kubevirtmgr-webui/browser /usr/share/nginx/html