Skip to content

Commit 6dc069f

Browse files
committed
Build Docker containers from project root
1 parent e48a5ef commit 6dc069f

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

apps/evm/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ RUN --mount=type=cache,target=/go/pkg/mod \
1010

1111
COPY . .
1212

13-
WORKDIR /src/apps/evm
1413
RUN --mount=type=cache,target=/go/pkg/mod \
14+
cd ./apps/evm && \
1515
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/evm .
1616

1717

@@ -25,7 +25,7 @@ COPY --from=build-env /out/evm /usr/bin/evm
2525
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2626
COPY --from=build-env --chown=10001:10001 /out/home-ev-node /home/ev-node
2727
COPY --from=busybox /bin/busybox /bin/busybox
28-
COPY apps/evm/entrypoint.sh /usr/bin/entrypoint.sh
28+
COPY --from=build-env /src/apps/evm/entrypoint.sh /usr/bin/entrypoint.sh
2929

3030
WORKDIR /home/ev-node
3131
USER 10001:10001

apps/grpc/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ COPY . .
1414

1515
RUN mkdir -p /home/ev-node
1616
RUN --mount=type=cache,target=/go/pkg/mod \
17-
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/evgrpc ./apps/grpc
17+
cd ./apps/grpc && \
18+
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/evgrpc .
1819

1920
FROM scratch
2021

apps/grpc/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
# Local DA service for development
55
local-da:
66
build:
7-
context: ../../../
7+
context: ../../
88
dockerfile: tools/local-da/Dockerfile
99
ports:
1010
- "7980:7980"
@@ -34,7 +34,7 @@ services:
3434
# Evolve node with gRPC execution client
3535
evolve-grpc:
3636
build:
37-
context: ../../../
37+
context: ../../
3838
dockerfile: apps/grpc/Dockerfile
3939
depends_on:
4040
local-da:

apps/testapp/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ RUN --mount=type=cache,target=/go/pkg/mod \
1111
COPY . .
1212
RUN mkdir -p /home/ev-node
1313
RUN --mount=type=cache,target=/go/pkg/mod \
14-
cd apps/testapp && CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/testapp .
14+
cd ./apps/testapp && \
15+
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w" -o /out/testapp .
1516

1617
FROM scratch
1718

apps/testapp/out/testapp

39.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)