blob: e336f125c1a4ffd7897c252aa0500f5c83fbe2d9 [file] [log] [blame]
Mohammed Naserda994232024-04-13 12:34:01 -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 Naserda994232024-04-13 12:34:01 -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 Naserda994232024-04-13 12:34:01 -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 Naserda994232024-04-13 12:34:01 -040025FROM registry.atmosphere.dev/library/ubuntu:main AS libvirt-tls-sidecar
26COPY --from=libvirt-tls-sidecar-builder /src/main /usr/bin/libvirt-tls-sidecar
27ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"]