Add debugging support for Docker container. (#228)
This commit is contained in:
parent
dec31761b2
commit
b0bcdacc7d
@ -4,6 +4,9 @@ RUN apk --update --no-cache add make git g++ linux-headers
|
||||
# DEBUG
|
||||
RUN apk add busybox-extras
|
||||
|
||||
# Include dlv
|
||||
RUN go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
|
||||
# Build ipld-eth-server
|
||||
WORKDIR /go/src/github.com/cerc-io/ipld-eth-server
|
||||
|
||||
@ -46,4 +49,7 @@ COPY --from=builder /go/src/github.com/cerc-io/ipld-eth-server/ipld-eth-server i
|
||||
COPY --from=builder /goose goose
|
||||
COPY --from=builder /go/src/github.com/cerc-io/ipld-eth-server/environments environments
|
||||
|
||||
# Allow for debugging
|
||||
COPY --from=builder /go/bin/dlv /usr/local/bin/
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
@ -2,8 +2,13 @@
|
||||
|
||||
echo "Beginning the ipld-eth-server process"
|
||||
|
||||
echo running: ./ipld-eth-server ${VDB_COMMAND} --config=config.toml
|
||||
./ipld-eth-server ${VDB_COMMAND} --config=config.toml
|
||||
START_CMD="./ipld-eth-server"
|
||||
if [ "true" == "$CERC_REMOTE_DEBUG" ] && [ -x "/usr/local/bin/dlv" ]; then
|
||||
START_CMD="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --accept-multiclient exec `pwd`/ipld-eth-server --continue --"
|
||||
fi
|
||||
|
||||
echo running: $START_CMD ${VDB_COMMAND} --config=`pwd`/config.toml
|
||||
$START_CMD ${VDB_COMMAND} --config=`pwd`/config.toml
|
||||
rv=$?
|
||||
|
||||
if [ $rv != 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user