File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -325,21 +325,25 @@ the builds of these images. The `Dockerfile` must follow these specifications:
325
325
Here is an example of a ` Dockerfile ` that follows the specifications for an engine written in Node.js:
326
326
327
327
```
328
- FROM node
328
+ FROM node:7.7-alpine
329
329
330
- MAINTAINER Michael R. Bernstein
330
+ LABEL maintainer "Your Name <[email protected] >"
331
331
332
- RUN useradd -u 9000 -r -s /bin/false app
332
+ WORKDIR /usr/src/app
333
+ COPY package.json /usr/src/app/
333
334
334
- RUN npm install glob
335
+ RUN npm install
335
336
336
- WORKDIR /code
337
+ RUN adduser -u 9000 -D app
337
338
COPY . /usr/src/app
339
+ RUN chown -R app:app /usr/src/app
338
340
339
341
USER app
342
+
340
343
VOLUME /code
344
+ WORKDIR /code
341
345
342
- CMD ["/usr/src/app/bin/fixme "]
346
+ CMD ["/usr/src/app/bin/your-engine "]
343
347
```
344
348
345
349
## Naming convention
You can’t perform that action at this time.
0 commit comments