Ready to use, secure and lean docker images.
A docker image based on debian jessie that bundles both modern Python interpreter and Node.js, with Yarn.
$ docker run -it okdocker/pynode:latest /bin/bash
Application code should go into the /app
default working directory, image do not use volumes and expose no ports.
A real world example would probably use it as base image for a custom image. Here is a minimalistic working dockerfile.
FROM okdocker/pynode:latest
# Python dependencies
ADD requirements.txt /app/
RUN pip install -r requirements.txt
# Node.js dependencies
ADD package.json yarn.lock /app/
RUN yarn install
# Application
ADD public /app/public
WORKDIR /app/public
RUN ln -s ../node_modules/jquery/dist/jquery.min.js jquery.js \
&& ln -s ../node_modules/bootstrap/dist/js/bootstrap.min.js bootstrap.js \
&& ln -s ../node_modules/bootstrap/dist/css/bootstrap.min.css bootstrap.css
# Public interface
EXPOSE 8000
CMD python -m http.server
You can have a look at the basic okdocker/pynode example.