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