Add Dockerfile

This commit is contained in:
Rob Watson 2021-02-25 21:20:09 +01:00
parent 4c8532fc7d
commit 36c75a3a0f
3 changed files with 28 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
/esbot

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM golang:alpine as builder
WORKDIR /app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
# final stage
FROM scratch
COPY --from=builder /app/esbot /app/
COPY internal/lang/resources/jehle_verb_database.csv /app/verbs.csv
EXPOSE 8080
ENTRYPOINT ["/app/esbot"]

View File

@ -1,5 +1,12 @@
# esbot
## Build
```
docker build -t esbot .
docker save esbot | bzip2 | pv | ssh servername 'bunzip2 | docker load'
```
## Usage
```