Skip to content

Commit f0a28b2

Browse files
committed
init docker readme, dockerfile and docker ignore
1 parent 2b29211 commit f0a28b2

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed

.dockerignore

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Logs
2+
*.log
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
7+
# Runtime data
8+
*.pid
9+
*.seed
10+
*.pid.lock
11+
12+
# Directory for instrumented libs generated by jscoverage/JSCover
13+
lib-cov
14+
15+
# Coverage directory used by tools like istanbul
16+
coverage
17+
18+
# nyc test coverage
19+
.nyc_output
20+
21+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22+
.grunt
23+
24+
# Bower dependency directory (https://bower.io/)
25+
bower_components
26+
27+
# node-waf configuration
28+
.lock-wscript
29+
30+
# Compiled binary addons (https://nodejs.org/api/addons.html)
31+
build/Release
32+
33+
# Dependency directories
34+
node_modules/
35+
jspm_packages/
36+
37+
# Optional npm cache directory
38+
.npm
39+
40+
# Optional eslint cache
41+
.eslintcache
42+
43+
# Optional REPL history
44+
.node_repl_history
45+
46+
# Output of 'npm pack'
47+
*.tgz
48+
49+
# Yarn Integrity file
50+
.yarn-integrity
51+
52+
# dotenv environment variables file
53+
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
57+
58+
# OS X temporary files
59+
.DS_Store
60+
61+
# build files
62+
debug.log
63+
junit.xml
64+
65+
# vim swap files
66+
*.swp
67+
*.swo
68+
69+
# package build directories
70+
lib/
71+
dist/
72+
build/
73+
out/
74+
typedocs/
75+
76+
# scratchpad file
77+
.TODO

DOCKER.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Docker
2+
3+
Run these commands to setup the dev env, which is a copy of the local repo as-is in a volume and a container attached to that volume:
4+
5+
1. `docker build --tag mfbtech-react-async-renderer-dev-env .`
6+
1. `docker run --name mfbtech-react-async-renderer-dev-env -td mfbtech-react-async-renderer-dev-env`
7+
8+
Now attach to the container using vscode and the remote explorer extension.
9+
10+
>
11+
> Deleting the container will delete the volume as well, so make sure you have all of your work pushed before deleting the container.
12+
>

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:16-bullseye AS base-with-deps
2+
3+
ARG USERNAME=vscode
4+
5+
# setup the vscode user for the developer
6+
RUN groupadd -r $USERNAME \
7+
&& useradd --no-log-init -rm -d /home/$USERNAME -s /bin/bash -g $USERNAME $USERNAME
8+
USER $USERNAME
9+
WORKDIR /home/$USERNAME
10+
11+
# copy local repo into a volume
12+
FROM base-with-deps AS mfbtech-react-async-renderer-dev-env
13+
RUN mkdir /home/$USERNAME/git
14+
COPY --chown=$USERNAME:$USERNAME . /home/$USERNAME/git
15+
VOLUME /home/$USERNAME/git

0 commit comments

Comments
 (0)