November 2017
Intermediate to advanced
298 pages
7h 10m
English
Nothing special here: the file is pretty much a trimmed-down version of our older Node.js app:
FROM node:8# Make sure we are fully up to dateRUN apt-get update -q && \ apt-get dist-upgrade -y && \ apt-get clean && \ apt-get autoclean# Container port that should get exposedEXPOSE 8000ENV SRV_PATH /usr/local/share/queue_handler# Make our directoryRUN mkdir -p $SRV_PATH && \ chown node:node $SRV_PATHWORKDIR $SRV_PATHUSER nodeCOPY . $SRV_PATH/RUN npm installCMD ["npm", "start"]
We will build the image now:
$ docker build -t queue-worker .Sending build context to Docker daemon 7.168kB<snip> ---> 08e33a32ba60Removing intermediate container e17c836c5a33Successfully built 08e33a32ba60Successfully tagged queue-worker:latest
With the image ...
Read now
Unlock full access