From 7c4d02025644482442004cd2953994ae4cce44e7 Mon Sep 17 00:00:00 2001 From: Aymen-Tirchi Date: Sat, 23 Sep 2023 15:03:18 +0100 Subject: [PATCH] path issue --- docker-compose.yaml | 16 ++++++++-------- docker/Dockerfile.op-stack | 14 +++++++------- docker/Dockerfile.run-op-batcher | 10 +++++++--- docker/Dockerfile.run-op-geth | 10 +++++++--- docker/Dockerfile.run-op-node | 10 +++++++--- docker/Dockerfile.run-op-proposer | 10 +++++++--- 6 files changed, 43 insertions(+), 27 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index eba7959..0e2348c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -48,8 +48,8 @@ services: run-op-geth: build: - context: ./docker - dockerfile: Dockerfile.run-op-geth + context: . + dockerfile: docker/Dockerfile.run-op-geth volumes: - ./op-stack-deployer:/app working_dir: /app @@ -59,8 +59,8 @@ services: run-op-node: build: - context: ./docker - dockerfile: Dockerfile.run-op-node + context: . + dockerfile: docker/Dockerfile.run-op-node volumes: - ./op-stack-deployer:/app working_dir: /app @@ -70,8 +70,8 @@ services: run-op-batcher: build: - context: ./docker - dockerfile: Dockerfile.run-op-batcher + context: . + dockerfile: docker/Dockerfile.run-op-batcher volumes: - ./op-stack-deployer:/app working_dir: /app @@ -81,8 +81,8 @@ services: run-op-proposer: build: - context: ./docker - dockerfile: Dockerfile.run-op-proposer + context: . + dockerfile: docker/Dockerfile.run-op-proposer volumes: - ./op-stack-deployer:/app working_dir: /app diff --git a/docker/Dockerfile.op-stack b/docker/Dockerfile.op-stack index d4cc498..52b9b04 100644 --- a/docker/Dockerfile.op-stack +++ b/docker/Dockerfile.op-stack @@ -17,7 +17,7 @@ FROM common AS build-optimism RUN chmod +x /app/entrypoint-build-optimism.sh -RUN ["sh", "/app/entrypoint-build-optimism.sh"] +RUN /app/entrypoint-build-optimism.sh # Stage 2: Build op-geth FROM common AS build-op-geth @@ -26,7 +26,7 @@ COPY docker/scripts/entrypoint-build-op-geth.sh /app/ RUN chmod +x /app/entrypoint-build-op-geth.sh -RUN ["sh", "/app/entrypoint-build-op-geth.sh"] +RUN /app/entrypoint-build-op-geth.sh # Stage 3: Generate Keys FROM common AS generate-keys @@ -35,7 +35,7 @@ COPY docker/scripts/entrypoint-generate-keys.sh /app/ RUN chmod +x /app/entrypoint-generate-keys.sh -RUN ["sh", "/app/entrypoint-generate-keys.sh"] +RUN /app/entrypoint-generate-keys.sh # Stage 4: Configure Network FROM common AS configure-network @@ -44,7 +44,7 @@ COPY docker/scripts/entrypoint-configure-network.sh /app/ RUN chmod +x /app/entrypoint-configure-network.sh -RUN ["sh", "/app/entrypoint-configure-network.sh"] +RUN /app/entrypoint-configure-network.sh # Stage 5: Deploy L1 Contracts FROM common AS deploy-l1-contracts @@ -53,7 +53,7 @@ COPY docker/scripts/entrypoint-deploy-l1-contracts.sh /app/ RUN chmod +x /app/entrypoint-deploy-l1-contracts.sh -RUN ["sh", "/app/entrypoint-deploy-l1-contracts.sh"] +RUN /app/entrypoint-deploy-l1-contracts.sh # Stage 6: Configure L2 FROM common AS configure-l2 @@ -62,7 +62,7 @@ COPY docker/scripts/entrypoint-l2-config.sh /app/ RUN chmod +x /app/entrypoint-l2-config.sh -RUN ["sh", "/app/entrypoint-l2-config.sh"] +RUN /app/entrypoint-l2-config.sh # Stage 7: Initialize op-geth FROM common AS init-op-geth @@ -71,4 +71,4 @@ COPY docker/scripts/entrypoint-init-op-geth.sh /app/ RUN chmod +x /app/entrypoint-init-op-geth.sh -RUN ["sh", "/app/entrypoint-init-op-geth.sh"] +RUN /app/entrypoint-init-op-geth.sh diff --git a/docker/Dockerfile.run-op-batcher b/docker/Dockerfile.run-op-batcher index 828c599..e069ba4 100644 --- a/docker/Dockerfile.run-op-batcher +++ b/docker/Dockerfile.run-op-batcher @@ -1,7 +1,11 @@ -FROM golang:alpine +# Use the official Go image as the base image +FROM golang:alpine AS run-op-batcher +# Set the working directory inside the container WORKDIR /app -COPY Dockerfile.run-op-batcher /app/ +# Copy the source code for 10_run_op-batcher +COPY cmd/10_run_op-batcher /app/ -RUN ["sh", "go run cmd/10_run_op-batcher/main.go"] \ No newline at end of file +# Define the command to run when the container starts +CMD ["go run cmd/10_run_op-batcher/main.go "] diff --git a/docker/Dockerfile.run-op-geth b/docker/Dockerfile.run-op-geth index 9e5c41d..4ad82f3 100644 --- a/docker/Dockerfile.run-op-geth +++ b/docker/Dockerfile.run-op-geth @@ -1,7 +1,11 @@ -FROM golang:alpine +# Use the official Go image as the base image +FROM golang:alpine AS run-op-geth +# Set the working directory inside the container WORKDIR /app -COPY Dockerfile.run-op-geth /app/ +# Copy the source code for 8_run_op-geth +COPY cmd/8_run_op-geth /app/ -RUN ["sh", "go run cmd/8_run_op-geth/main.go"] \ No newline at end of file +# Define the command to run when the container starts +CMD ["go run cmd/8_run_op-geth/main.go"] diff --git a/docker/Dockerfile.run-op-node b/docker/Dockerfile.run-op-node index 6105280..4d2c66e 100644 --- a/docker/Dockerfile.run-op-node +++ b/docker/Dockerfile.run-op-node @@ -1,7 +1,11 @@ -FROM golang:alpine +# Use the official Go image as the base image +FROM golang:alpine AS run-op-node +# Set the working directory inside the container WORKDIR /app -COPY Dockerfile.run-op-node /app/ +# Copy the source code for 9_run_op-node +COPY cmd/9_run_op-node /app/ -RUN ["sh", "go run cmd/9_run_op-node/main.go"] \ No newline at end of file +# Define the command to run when the container starts +CMD ["go run cmd/9_run_op-node/main.go "] diff --git a/docker/Dockerfile.run-op-proposer b/docker/Dockerfile.run-op-proposer index a08fd4d..f55f770 100644 --- a/docker/Dockerfile.run-op-proposer +++ b/docker/Dockerfile.run-op-proposer @@ -1,7 +1,11 @@ -FROM golang:alpine +# Use the official Go image as the base image +FROM golang:alpine AS run-op-proposer +# Set the working directory inside the container WORKDIR /app -COPY Dockerfile.run-op-proposer /app/ +# Copy the source code for 11_run_op-proposer +COPY cmd/11_run_op-proposer /app/ -RUN ["sh", "go run cmd/11_run_op-proposer/main.go"] \ No newline at end of file +# Define the command to run when the container starts +CMD ["go run cmd/11_run_op-proposer/main.go"]