Skip to content

Commit

Permalink
builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Sep 29, 2024
1 parent 7e29cd7 commit 6210547
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
FROM ubuntu:22.04
FROM ubuntu:24.04 AS builder
LABEL maintainer="Charlie Lewis <[email protected]>"
RUN apt-get update && apt-get install -y --no-install-recommends \
golang ca-certificates
COPY . /go/src/dovesnap
WORKDIR /go/src/dovesnap
RUN go build -o /dovesnap .

FROM ubuntu:24.04
RUN apt-get update && apt-get install -y --no-install-recommends \
iptables dbus && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy
RUN apt-get update && apt-get install -y --no-install-recommends \
ethtool iproute2 openvswitch-common openvswitch-switch \
udhcpc ca-certificates golang && \
udhcpc golang && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY . /go/src/dovesnap
WORKDIR /go/src/dovesnap
RUN go build -o / .
WORKDIR /
COPY --from=builder /dovesnap/ .
COPY udhcpclog.sh /udhcpclog.sh
ENTRYPOINT ["/dovesnap"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module dovesnap

go 1.18
go 1.22

require (
github.com/docker/docker v27.3.1+incompatible
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ github.com/go-logr/stdr
## explicit
github.com/godbus/dbus
# github.com/gogo/protobuf v1.3.2
## explicit; go 1.15
## explicit; go 1.18
github.com/gogo/protobuf/proto
# github.com/iqtlabs/faucetconfrpc v0.55.72
## explicit
## explicit; go 1.18
github.com/iqtlabs/faucetconfrpc/faucetconfserver
# github.com/kenshaw/baseconv v0.1.1
## explicit; go 1.15
Expand Down Expand Up @@ -133,7 +133,7 @@ go.opentelemetry.io/otel/metric/noop
go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
# golang.org/x/mod v0.21.0
## explicit; go 1.22
## explicit; go 1.22.0
# golang.org/x/net v0.29.0
## explicit; go 1.18
golang.org/x/net/http/httpguts
Expand All @@ -157,7 +157,7 @@ golang.org/x/text/unicode/norm
# golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
## explicit
# golang.org/x/tools v0.25.0
## explicit; go 1.22
## explicit; go 1.22.0
# google.golang.org/genproto/googleapis/rpc v0.0.0-20240924160255-9d4c2d233b61
## explicit; go 1.21
google.golang.org/genproto/googleapis/rpc/status
Expand Down

0 comments on commit 6210547

Please sign in to comment.