aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dockerignore18
-rw-r--r--Dockerfile27
-rw-r--r--README.md9
3 files changed, 54 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..78b3e36d8
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,18 @@
1node_modules
2flow-typed
3out
4.DS_Store
5.idea
6build
7.tmp
8.stage
9.env
10yarn-error.log
11npm-debug.log*
12lerna-debug.log
13uidev/lib
14*.tsbuildinfo
15.dockerignore
16Dockerfile
17.git*
18*.md
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..c30270660
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
1FROM node:14 as builder
2
3RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
4 && apt-get -y install --no-install-recommends libx11-dev libxext-dev libxss-dev libxkbfile-dev rpm \
5 && apt-get autoremove -y \
6 && apt-get clean -y \
7 && rm -rf /var/lib/apt/lists/*
8
9WORKDIR /usr/src/ferdi
10
11COPY package*.json ./
12COPY lerna.json ./
13
14RUN npm i gulp@^4.0.0
15RUN npx lerna bootstrap
16
17COPY . .
18
19RUN npm run build
20
21FROM busybox
22
23WORKDIR /ferdi
24
25COPY --from=builder /usr/src/ferdi/out/* /ferdi/
26
27VOLUME [ "/ferdi-out" ]
diff --git a/README.md b/README.md
index 1c8f587fa..1003e6d7f 100644
--- a/README.md
+++ b/README.md
@@ -299,6 +299,15 @@ $ cd recipes
299$ npm install && npm run package 299$ npm install && npm run package
300``` 300```
301 301
302### Using Docker to build a package
303
304```bash
305$ docker build -t ferdi-package .
306$ docker run -v tmp-out:/ferdi-out -it ferdi-package sh
307```
308
309The above will place all the built artifacts into the `/ferdi` folder within the image. If you want to copy them outside of the image, simply mount a volume into a different location, and copy all files from `/ferdi` into the mounted folder (`/ferdi-out` in the 2nd example command above).
310
302### Start development app 311### Start development app
303 312
304Run these two commands **simultaneously** in different terminals: 313Run these two commands **simultaneously** in different terminals: