Browse Source

🐳 dockerized

master
emile 1 year ago
parent
commit
6d413cbe72
Signed by: emile GPG Key ID: 4D8DD313A751DED7
  1. 15
      Dockerfile
  2. 10
      README.md

15
Dockerfile

@ -0,0 +1,15 @@
FROM golang:1.14 as build-env
WORKDIR /go/src/app
ADD . /go/src/app
ENV PATH="$GOPATH/bin:$PATH"
ENV GOBIN="$GOPATH/bin"
RUN go env
RUN go get -d -v ./...
RUN go build -o /go/bin/reqlog main.go
FROM gcr.io/distroless/base
COPY --from=build-env /go/bin/reqlog /
CMD ["/reqlog"]

10
README.md

@ -3,3 +3,13 @@
A simple http logger logging all requests to the http server that is exposed.
reset all by sending a POST request to `/resetall`
## Docker
Simple Dockerfile included (multistage build → 24.9MB Image).
```!bash
$ docker build . -t reqlog
$ docker run --rm -p 8085:8085 reqlog
```

Loading…
Cancel
Save