Skip to content

Commit a70ee18

Browse files
committed
feat: create a docker image to run anubis
1 parent 5663b95 commit a70ee18

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Dockerfile
2+
.gitignore
3+
ruke.toml
4+
anubis.toml

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM golang:1.22.5-alpine AS build
2+
3+
RUN apk update && apk add --no-cache git
4+
5+
WORKDIR /anubis
6+
COPY . .
7+
8+
RUN go mod download
9+
10+
ENV CGO_ENABLED=0
11+
12+
RUN go build -ldflags="-s -w" -o /bin/anubis ./cmd/main.go
13+
14+
FROM scratch AS production
15+
16+
COPY --from=build /bin/anubis /bin/anubis
17+
18+
ENTRYPOINT [ "/bin/anubis" ]

0 commit comments

Comments
 (0)