Skip to content

Commit

Permalink
Add Docker container for fully bootstrapped dev setup
Browse files Browse the repository at this point in the history
This grabs all the necessary dependencies and should be setup for us to
run whatever CI commands, or general dev commands we might want.
  • Loading branch information
rweald committed May 18, 2022
1 parent b784611 commit 617ceb5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
**/*/node_modules

target
# No reason to copy over git repo
.git
30 changes: 30 additions & 0 deletions AllPackages.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM node:lts

WORKDIR /app

#Copy top level package dependency file
COPY lerna.json ./
COPY package.json ./
COPY package-lock.json ./

COPY packages packages

#Remove all files that are not package.json files. This is a hack to allow for dependency installation to be cached
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 10 -print | xargs rm -rf

# Second Build Phase that makes use of only package.json files from above
FROM node:lts

WORKDIR /app

RUN npm install -g lerna

COPY --from=0 /app .

# Install all deps for all packages
RUN lerna bootstrap

# Copy over all the source code
COPY . .

ENTRYPOINT ["lerna"]

1 comment on commit 617ceb5

@vercel
Copy link

@vercel vercel bot commented on 617ceb5 May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

rly-ts – ./packages/examples/react/test-app

rly-ts-git-main-rly-network.vercel.app
rly-ts-rly-network.vercel.app

Please sign in to comment.