Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 1 | # 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 Naser | 682ba51 | 2024-04-03 13:56:18 -0400 | [diff] [blame] | 14 | |
Mohammed Naser | d30f18d | 2024-04-17 01:20:43 -0400 | [diff] [blame] | 15 | ARG RELEASE |
| 16 | |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 17 | FROM golang:1.21 AS go-builder |
| 18 | COPY go.mod go.sum /src/ |
| 19 | WORKDIR /src |
| 20 | RUN go mod download |
Mohammed Naser | ee1ff23 | 2024-04-05 13:52:18 -0400 | [diff] [blame] | 21 | |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 22 | FROM go-builder AS libvirt-tls-sidecar-builder |
| 23 | COPY cmd/ /src/cmd/ |
| 24 | COPY internal/ /src/internal/ |
| 25 | RUN go build -o main ./cmd/libvirt-tls-sidecar/main.go |
Mohammed Naser | 682ba51 | 2024-04-03 13:56:18 -0400 | [diff] [blame] | 26 | |
Mohammed Naser | d30f18d | 2024-04-17 01:20:43 -0400 | [diff] [blame] | 27 | FROM registry.atmosphere.dev/library/ubuntu:${RELEASE} AS libvirt-tls-sidecar |
Mohammed Naser | da99423 | 2024-04-13 12:34:01 -0400 | [diff] [blame] | 28 | COPY --from=libvirt-tls-sidecar-builder /src/main /usr/bin/libvirt-tls-sidecar |
| 29 | ENTRYPOINT ["/usr/bin/libvirt-tls-sidecar"] |