Skip to content

Instantly share code, notes, and snippets.

@dustinsoftware
Created January 6, 2020 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinsoftware/59f9a7a1c793c6e55c0abc676944573e to your computer and use it in GitHub Desktop.
Save dustinsoftware/59f9a7a1c793c6e55c0abc676944573e to your computer and use it in GitHub Desktop.
run untrusted react code samples in container
# Example: docker-compose up --build
# docker exec -it my_container_name_1 /bin/bash
# At the prompt, run `yarn start --port 4200` or whatever
version: "3"
services:
web:
build: .
ports:
- "4200:4200"
FROM node:12
COPY . /app
WORKDIR /app
RUN yarn install
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment