Skip to content

Commit

Permalink
ops: add .git folder to docker setup
Browse files Browse the repository at this point in the history
This allows scripts that depend on the git hash
at build/runtime to access it.
  • Loading branch information
tynes authored and smartcontracts committed Nov 10, 2021
1 parent 0272a53 commit cb7e3ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.git
.github

node_modules
Expand Down
1 change: 1 addition & 0 deletions ops/docker/Dockerfile.deployer
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ COPY --from=builder /optimism/packages/contracts/dist ./dist
COPY --from=builder /optimism/packages/contracts/*.json ./
COPY --from=builder /optimism/packages/contracts/node_modules ./node_modules
COPY --from=builder /optimism/packages/contracts/artifacts ./artifacts
COPY --from=builder /optimism/.git ./.git

# get non-build artifacts from the host
COPY packages/contracts/bin ./bin
Expand Down
2 changes: 2 additions & 0 deletions ops/docker/Dockerfile.monorepo
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ FROM node as builder
# note: this approach can be a bit unhandy to maintain, but it allows
# us to cache the installation steps
WORKDIR /optimism
COPY .git ./.git
COPY *.json yarn.lock ./
COPY packages/core-utils/package.json ./packages/core-utils/package.json
COPY packages/common-ts/package.json ./packages/common-ts/package.json
Expand All @@ -45,6 +46,7 @@ WORKDIR /optimism
COPY --from=builder /optimism/node_modules ./node_modules
COPY --from=builder /optimism/packages ./packages
COPY --from=builder /optimism/integration-tests ./integration-tests
COPY --from=builder /optimism/.git ./.git

# the following steps are cheap
COPY *.json yarn.lock ./
Expand Down

0 comments on commit cb7e3ae

Please sign in to comment.