Added @Xe's tips on the Dockerfile
https://github.com/Shuo-IRC/Shuo/pull/87
This commit is contained in:
parent
7c54a97fad
commit
5d8669112d
26
Dockerfile
26
Dockerfile
@ -1,3 +1,25 @@
|
|||||||
FROM node:0.12-onbuild
|
#
|
||||||
|
# Thanks to @Xe for the Dockerfile template
|
||||||
|
# https://github.com/Shuo-IRC/Shuo/pull/87/files
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM node:4.0-onbuild
|
||||||
|
|
||||||
|
# Create a non-root user for shout to run in.
|
||||||
|
RUN useradd --create-home shout
|
||||||
|
|
||||||
|
# Needed for setup of Node.js
|
||||||
|
ENV HOME /home/shout
|
||||||
|
|
||||||
|
# Customize this to specify where Shout puts its data.
|
||||||
|
# To link a data container, have it expose /home/shout/data
|
||||||
|
ENV SHOUT_HOME /home/shout/data
|
||||||
|
|
||||||
|
# Expose HTTP
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
ENTRYPOINT ["node", "index.js"]
|
|
||||||
|
# Drop root.
|
||||||
|
USER shout
|
||||||
|
|
||||||
|
# Don't use an entrypoint here. It makes debugging difficult.
|
||||||
|
CMD node index.js --home $SHOUT_HOME
|
||||||
|
4
docker-compose.yml
Normal file
4
docker-compose.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
shout:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "9000:9000"
|
Loading…
Reference in New Issue
Block a user