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. |
| 14 | |
| 15 | FROM golang:1.20 AS build |
| 16 | ARG NETOFFLOAD_GIT_REF=94b8c0fdb0b83bd1b7e14b9a58077a047c78a800 |
| 17 | ADD https://github.com/vexxhost/netoffload.git#${NETOFFLOAD_GIT_REF} /src |
| 18 | WORKDIR /src |
| 19 | RUN go build -v -o offloadctl ./cmd/offloadctl/main.go |
| 20 | |
| 21 | FROM registry.atmosphere.dev/library/ubuntu:main |
| 22 | RUN <<EOF bash -xe |
| 23 | apt-get update -qq |
| 24 | apt-get install -qq -y --no-install-recommends \ |
| 25 | jq mstflint |
| 26 | apt-get clean |
| 27 | rm -rf /var/lib/apt/lists/* |
| 28 | EOF |
| 29 | COPY --from=build --link /src/offloadctl /usr/local/bin/offloadctl |