Skip to content

Commit

Permalink
docker: add initial simple Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
deadprogram committed Mar 21, 2022
1 parent 5de12d0 commit 83c170b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM golang:1.18.0-alpine3.15 AS builder

RUN apk update
RUN apk add git

WORKDIR /app

COPY go.mod ./
COPY go.sum ./
RUN go mod download

COPY . ./

RUN go build -o /app/mochi ./cmd


FROM alpine

WORKDIR /
COPY --from=builder /app/mochi .

# tcp
EXPOSE 1883

# websockets
EXPOSE 1882

# dashboard
EXPOSE 8080

CMD [ "/mochi" ]

0 comments on commit 83c170b

Please sign in to comment.