Skip to content

Commit

Permalink
๐Ÿณdocker: add docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
eogns47 committed Jan 30, 2024
1 parent bb2acf1 commit 09b97b5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.env
main
*.csv
NameServer_Finder
/logs/*
```
23 changes: 23 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.21.5 as builder
# ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
WORKDIR /app/NameServer_Finder

# ์†Œ์Šค ์ฝ”๋“œ๋ฅผ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.
COPY . .

# Go ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋นŒ๋“œํ•ฉ๋‹ˆ๋‹ค.
RUN go build -o NameServer_Finder src/main.go

# ์ตœ์ข… ์ด๋ฏธ์ง€๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
FROM alpine:latest

RUN apk add --no-cache libc6-compat
# ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
WORKDIR /app/NameServer_Finder

# ๋นŒ๋“œํ•œ ์‹คํ–‰ ํŒŒ์ผ์„ ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.
COPY --from=builder /app/NameServer_Finder .


# ์‹คํ–‰ํ•  ๋ช…๋ น์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
ENTRYPOINT ["./NameServer_Finder"]

0 comments on commit 09b97b5

Please sign in to comment.