From 81c98245a4bda3b93e585443d6493baaa6c3e0fe Mon Sep 17 00:00:00 2001 From: Ksan Date: Tue, 14 Apr 2026 13:12:14 +0200 Subject: [PATCH] made docker file and not sure if needed --- .gitignore | 3 ++- dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 dockerfile diff --git a/.gitignore b/.gitignore index 3480788..d7bea2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ connections.log -.ssh/ +ssh-portfilio +/.ssh/ diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..03a9f91 --- /dev/null +++ b/dockerfile @@ -0,0 +1,22 @@ +FROM golang:1.26.2-alpine AS builder + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN go build -o ssh-portfolio-app . + +FROM alpine:latest + +WORKDIR /root/ + +RUN apk add --no-cache ca-certificates + +COPY --from=builder /app/ssh-portfolio-app . + +EXPOSE 2222 + +CMD ["./ssh-portfolio-app"]