Skip to content

Commit

Permalink
Add dockerfile (#10)
Browse files Browse the repository at this point in the history
* Adds a dockerfile, so that packet-headers can show up on dockerhub
  • Loading branch information
pboothe authored Oct 30, 2019
1 parent ae9b04e commit e176aa9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Build packet-headers
FROM golang:1.12-alpine 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 \
-ldflags "-X github.com/m-lab/go/prometheusx.GitShortCommit=$(git log -1 --format=%h)" \
.
RUN chmod a+rx /go/bin/packet-headers

# Put it in its own image.
FROM alpine
RUN apk --no-cache add libpcap
COPY --from=build /go/bin/packet-headers /packet-headers
WORKDIR /
ENTRYPOINT ["/packet-headers"]

0 comments on commit e176aa9

Please sign in to comment.