Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
kdudkov committed Nov 1, 2023
1 parent ca15a6a commit 65a4eb6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:alpine AS builder

WORKDIR /build
COPY . .
RUN go mod tidy && go build -o dist/ ./cmd/...

FROM alpine

WORKDIR /app
COPY --from=builder /build/dist/goatak_server /app/goatak_server
COPY ./data /app/
COPY ./goatak_server.yml /app/
COPY ./users.yml /app/
CMD ["./goatak_server"]
5 changes: 5 additions & 0 deletions docker_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

ver=$(git describe --always --dirty)
docker build . -t kdudkov/goatak_server:$ver -t kdudkov/goatak_server:latest
docker push kdudkov/goatak_server:$ver kdudkov/goatak_server:latest

0 comments on commit 65a4eb6

Please sign in to comment.