blob: a1a0ec24eb9b3a92a7f9f135da583cc437d0a51b [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
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040015ARG RELEASE
16
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040017FROM golang:1.20 AS build
18ARG NETOFFLOAD_GIT_REF=94b8c0fdb0b83bd1b7e14b9a58077a047c78a800
19ADD https://github.com/vexxhost/netoffload.git#${NETOFFLOAD_GIT_REF} /src
20WORKDIR /src
21RUN go build -v -o offloadctl ./cmd/offloadctl/main.go
22
Mohammed Naser19c6c8a2024-04-18 01:47:10 -040023FROM registry.atmosphere.dev/library/ubuntu:${RELEASE}
Mohammed Naserd28fbaf2024-04-08 17:15:00 -040024RUN <<EOF bash -xe
25apt-get update -qq
26apt-get install -qq -y --no-install-recommends \
27 jq mstflint
28apt-get clean
29rm -rf /var/lib/apt/lists/*
30EOF
31COPY --from=build --link /src/offloadctl /usr/local/bin/offloadctl