Skip to content

Commit

Permalink
speed up local dev dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
0xBigBoss committed Aug 1, 2023
1 parent e045e63 commit aab0217
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
11 changes: 1 addition & 10 deletions build/Dockerfile.client
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
ARG GOLANG_IMAGE_VERSION=golang:1.20-alpine3.16
ARG GOLANG_IMAGE_VERSION=golang:1.20-bookworm

FROM ${GOLANG_IMAGE_VERSION} AS builder

ENV POCKET_ROOT=/go/src/github.com/pocket-network

WORKDIR $POCKET_ROOT

COPY . .

# Install bash
RUN apk add --no-cache bash

# Hot reloading
RUN go install github.com/cespare/reflex@latest

CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions build/Dockerfile.localdev
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ ENV POCKET_ROOT=/go/src/github.com/pocket-network/
# Source code
WORKDIR $POCKET_ROOT

COPY . .

# Hot reloading
RUN go install github.com/cespare/reflex@latest

Expand All @@ -25,3 +23,5 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest
# Needed to make `go install dlv` and `dlv debug` work...
RUN apk update && apk add --no-cache gcc musl-dev
RUN go get github.com/go-delve/delve/cmd/dlv@latest

COPY . .
14 changes: 7 additions & 7 deletions build/deployments/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
# Any host that is visible and connected to the cluster can be arbitrarily selected as the RPC host
- POCKET_REMOTE_CLI_URL=http://validator1:50832
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
stdin_open: true
tty: true

Expand All @@ -47,7 +47,7 @@ services:
- "${VALIDATOR1_P2P_PORT:-0.0.0.0:42070}:42069"
- "${VALIDATOR1_RPC_PORT:-0.0.0.0:50832}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down Expand Up @@ -79,7 +79,7 @@ services:
- "${VALIDATOR2_P2P_PORT:-0.0.0.0:42071}:42069"
- "${VALIDATOR2_RPC_PORT:-0.0.0.0:50833}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down Expand Up @@ -107,7 +107,7 @@ services:
- "${VALIDATOR3_P2P_PORT:-0.0.0.0:42072}:42069"
- "${VALIDATOR3_RPC_PORT:-0.0.0.0:50834}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down Expand Up @@ -135,7 +135,7 @@ services:
- "${VALIDATOR4_P2P_PORT:-0.0.0.0:42073}:42069"
- "${VALIDATOR4_RPC_PORT:-0.0.0.0:50835}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down Expand Up @@ -171,7 +171,7 @@ services:
- "${SERVICER1_P2P_PORT:-0.0.0.0:42074}:42069"
- "${SERVICER1_RPC_PORT:-0.0.0.0:50836}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down Expand Up @@ -210,7 +210,7 @@ services:
- "${FISHERMAN1_P2P_PORT:-0.0.0.0:42075}:42069"
- "${FISHERMAN1_RPC_PORT:-0.0.0.0:50837}:50832"
volumes:
- ${PWD}:/go/src/github.com/pocket-network
- ${PWD}:/go/src/github.com/pocket-network:cached
# Needed for DLV debugging
security_opt:
- "seccomp:unconfined"
Expand Down

0 comments on commit aab0217

Please sign in to comment.