Add server build files
This commit is contained in:
3
ws-server/build.sh
Normal file
3
ws-server/build.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
# docker build -t youtube-download-ws-server .
|
||||
|
||||
tar -cf deploy.tar captain-definition dockerfile main.go go.mod go.sum
|
4
ws-server/captain-definition
Normal file
4
ws-server/captain-definition
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"dockerfilePath": "./dockerfile"
|
||||
}
|
BIN
ws-server/deploy.tar
Normal file
BIN
ws-server/deploy.tar
Normal file
Binary file not shown.
21
ws-server/dockerfile
Normal file
21
ws-server/dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM golang:1.22.4 as base
|
||||
|
||||
WORKDIR $GOPATH/src/app/
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
RUN go mod verify
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /main .
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=base /etc/passwd /etc/passwd
|
||||
COPY --from=base /etc/group /etc/group
|
||||
|
||||
COPY --from=base /main .
|
||||
|
||||
CMD ["/main"]
|
Reference in New Issue
Block a user