diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..ecd3df700 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "name": "Connect to server", + "type": "go", + "request": "attach", + "mode": "remote", + "port": 4000, + "host": "127.0.0.1", + } + ] +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1bc26a794..79ff5ad49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367eff RUN apk add --update --no-cache ca-certificates -FROM scratch +# FROM scratch +FROM golang COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt @@ -15,3 +16,9 @@ ENV GODEBUG=netdns=go ADD release/vela-server /bin/ CMD ["/bin/vela-server"] + +# dlv wrapper + +# EXPOSE 4000 +# RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest +# CMD [ "/go/bin/dlv", "--listen=:4000", "--headless=true", "--log=true", "--accept-multiclient", "--api-version=2", "exec", "/bin/vela-server" ]