Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
idoyo7 authored Aug 4, 2024
1 parent e751f9b commit e8c9031
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ WORKDIR /app
COPY . .

# Go 모듈 초기화 및 의존성 다운로드
RUN go mod init event-monitoring && \
go mod tidy
# RUN go mod init event-monitoring && \
# go mod tidy
RUN go mod tidy

# 애플리케이션 빌드
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o event-monitoring .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o event .

# 실행 이미지
FROM alpine:3.19.0
Expand All @@ -21,8 +22,8 @@ RUN apk --no-cache add ca-certificates
WORKDIR /root/

# 빌드된 실행 파일 복사
COPY --from=builder /app/event-monitoring .
COPY --from=builder /app/event .

# 실행 명령어 설정
CMD ["./event-monitoring"]
CMD ["./event"]

0 comments on commit e8c9031

Please sign in to comment.