Skip to content

Add dockerfile#1

Open
bear-brown-beard wants to merge 8 commits intomainfrom
add-dockerfile
Open

Add dockerfile#1
bear-brown-beard wants to merge 8 commits intomainfrom
add-dockerfile

Conversation

@bear-brown-beard
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@dirtymew dirtymew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет Михаил

хорошая работа - зачет

Comment thread Dockerfile

COPY go.mod go.sum ./

RUN go mod tidy
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше go mod download

Comment thread Dockerfile
@@ -0,0 +1,24 @@
FROM golang:1.23.4 AS builder
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше брать образ с нужной версией go - у тебя это go 1.22.0

Comment thread Dockerfile

RUN go build -o tracker .

FROM debian:bullseye-slim
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отлично что сделал multistage build

Comment thread Dockerfile
COPY --from=builder /app/tracker /app/
COPY --from=builder /app/tracker.db /app/

EXPOSE 8080
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это лишнее - приложение не сетевое еще

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants