blob: 278b4189cd7e410af279251561ba4c40eae40e1c [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 Naser19c6c8a2024-04-18 01:47:10 -040015ARG RELEASE
16
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040017FROM golang:1.21 AS go-builder
18COPY go.mod go.sum /src/
19WORKDIR /src
20RUN go mod download
Mohammed Naseree1ff232024-04-05 13:52:18 -040021
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040022FROM go-builder AS libvirt-tls-sidecar-builder
23COPY cmd/ /src/cmd/
24COPY internal/ /src/internal/
25RUN go build -o main ./cmd/libvirt-tls-sidecar/main.go
Mohammed Naser682ba512024-04-03 13:56:18 -040026
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040027FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS libvirt-tls-sidecar
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040028COPY --from=libvirt-tls-sidecar-builder /src/main /usr/bin/libvirt-tls-sidecar
29ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"]