Skip to content

Commit

Permalink
Update build to use go1.18 (#45)
Browse files Browse the repository at this point in the history
* Update build to use go1.18
  • Loading branch information
stephen-soltesz committed Aug 11, 2022
1 parent aa9202d commit 89fe863
Show file tree
Hide file tree
Showing 5 changed files with 619 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: go
go:
- 1.18

# From https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
before_install:
Expand All @@ -10,7 +12,7 @@ install:
- go get -v -t ./...

before_script:
- go get github.com/mattn/goveralls
- go install github.com/mattn/goveralls@latest

script:
- go vet ./...
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Build packet-headers
FROM golang:1.12-alpine as build
FROM golang:1.18-alpine3.16 as build
RUN apk --no-cache add libpcap-dev git gcc libc-dev
COPY . /go/src/github.com/m-lab/packet-headers
WORKDIR /go/src/github.com/m-lab/packet-headers
RUN go get -v \
RUN go install -v \
-ldflags "-X github.com/m-lab/go/prometheusx.GitShortCommit=$(git log -1 --format=%h)$(git diff --quiet || echo dirty)" \
.
RUN chmod a+rx /go/bin/packet-headers

# Put it in its own image.
FROM alpine
FROM alpine:3.16
RUN apk --no-cache add libpcap
COPY --from=build /go/bin/packet-headers /packet-headers
WORKDIR /
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
The packet-headers service provides a binary which collects packet headers for
all incoming TCP flows and saves each stream of packet captures into a
per-stream `.pcap` file where the filename is the
[UUID](https://github.com/m-lab/uuid) of the TCP flow. It only saves the packet
headers, and it supports (with a command-line flag) IP anonymity for the saved
addresses.
[UUID](https://github.com/m-lab/uuid) of the TCP flow. It only saves the
packet headers, and it supports (with a command-line flag) IP anonymity for
the saved addresses.


## Usage
Expand Down
27 changes: 27 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module github.com/m-lab/packet-headers

go 1.18

require (
github.com/google/gopacket v1.1.19
github.com/m-lab/go v0.1.53
github.com/m-lab/tcp-info v1.5.3
github.com/prometheus/client_golang v1.13.0
github.com/spf13/afero v1.9.2
)

require (
github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/gocarina/gocsv v0.0.0-20220729221910-a7386ae0b221 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit 89fe863

Please sign in to comment.