-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a553e8
commit bc6bb25
Showing
2 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
FROM golang:1.22-alpine3.18 | ||
FROM golang:1.22-alpine3.18 AS go-builder | ||
|
||
RUN apk update && apk add git | ||
|
||
WORKDIR /app | ||
|
||
COPY ./ ./ | ||
# COPY .env go.mod go.sum ./ | ||
# COPY ./database ./database | ||
# COPY ./entity ./entity | ||
# COPY ./domain ./domain | ||
COPY go.mod go.sum ./ | ||
COPY ./cmd/article-company-crawler ./cmd/article-company-crawler | ||
COPY ./database/init_db.go ./database/init_db.go | ||
COPY ./domain ./domain | ||
COPY ./entity ./entity | ||
COPY ./infrastructure/api ./infrastructure/api | ||
COPY ./infrastructure/rss ./infrastructure/rss | ||
COPY ./internal ./internal | ||
|
||
RUN go mod download | ||
RUN go mod download \ | ||
&& go build -o main /app/cmd/article-company-crawler/main.go | ||
|
||
# Build | ||
RUN go build -o main /app/cmd/article-company-crawler/main.go | ||
|
||
FROM alpine:3.18 | ||
WORKDIR /app | ||
COPY --from=go-builder /app/main . | ||
|
||
CMD ["/app/main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters