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