blob: 4b74bee9bd05886bd35ddcba0b99d954dad178a2 [file] [log] [blame]
Mohammed Naserd28fbaf2024-04-08 17:15:00 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
Mohammed Naser682ba512024-04-03 13:56:18 -040014
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040015FROM golang:1.21 AS go-builder
16COPY go.mod go.sum /src/
17WORKDIR /src
18RUN go mod download
Mohammed Naseree1ff232024-04-05 13:52:18 -040019
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040020FROM go-builder AS libvirt-tls-sidecar-builder
21COPY cmd/ /src/cmd/
22COPY internal/ /src/internal/
23RUN go build -o main ./cmd/libvirt-tls-sidecar/main.go
Mohammed Naser682ba512024-04-03 13:56:18 -040024
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040025FROM registry.atmosphere.dev/library/ubuntu:zed AS libvirt-tls-sidecar
26COPY --from=libvirt-tls-sidecar-builder /src/main /usr/bin/libvirt-tls-sidecar
27ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"]