made docker file and not sure if needed
This commit is contained in:
parent
3f02ba2096
commit
81c98245a4
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
connections.log
|
||||
.ssh/
|
||||
ssh-portfilio
|
||||
/.ssh/
|
||||
|
||||
22
dockerfile
Normal file
22
dockerfile
Normal file
@ -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"]
|
||||
Loading…
x
Reference in New Issue
Block a user