Created
January 6, 2020 16:02
-
-
Save dustinsoftware/59f9a7a1c793c6e55c0abc676944573e to your computer and use it in GitHub Desktop.
run untrusted react code samples in container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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