Go Compilation

Go Compilation
This commit is contained in:
Kroese 2023-04-23 20:01:01 +02:00 committed by GitHub
commit 3c4715a207
4 changed files with 8 additions and 7 deletions

View File

@ -1,10 +1,9 @@
FROM golang:1.20 AS builder
FROM golang AS builder
COPY serial/ /src/serial/
WORKDIR /src/serial
RUN go get -d -v golang.org/x/net/html
RUN go get -d -v github.com/gorilla/mux
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main .
FROM debian:bookworm-slim

View File

@ -2,3 +2,4 @@ module vdsm-serial
go 1.20
require github.com/gorilla/mux v1.8.0

View File

@ -1 +1,2 @@
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=

View File

@ -1,15 +1,15 @@
package main
import (
"bytes"
"encoding/binary"
"flag"
"fmt"
"log"
"net"
"flag"
"bytes"
"strconv"
"net/http"
"math/rand"
"encoding/binary"
"github.com/gorilla/mux"
)