Skip to content
This repository was archived by the owner on Mar 22, 2021. It is now read-only.

Commit e946fd4

Browse files
committed
Dockerized
1 parent ae65625 commit e946fd4

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Builder
2+
FROM golang:1.11-alpine as builder
3+
4+
RUN apk update && apk add git && apk add ca-certificates
5+
6+
WORKDIR /usr/src/app
7+
COPY . .
8+
9+
ENV GO11MODULE on
10+
11+
RUN go mod download
12+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s' -o main main.go
13+
14+
15+
### Make executable image
16+
FROM scratch
17+
18+
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
19+
COPY --from=builder /etc/passwd /etc/passwd
20+
COPY --from=builder /usr/src/app/main /main
21+
22+
ENTRYPOINT [ "/main" ]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Nagase
1+
# Nagase ![Docker Build Status](https://img.shields.io/docker/build/poolc/nagase.svg)
22

33
> PoolC 홈페이지 API 서버
44

0 commit comments

Comments
 (0)