Public Repository

Last pushed: 7 months ago
Short Description
Image for use in bitbucket pipelines. Image with node 6.10 and mongodb 3.2
Full Description

Docker images for use with bitbucket pipelines do not require any CMDs or ENTRYPOINT.

This image is built FROM node:6.10 and then mongodb is installed with the following:

# Install mongodb
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 \
  && echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list \
  && apt-get update \
  && apt-get install -y mongodb-org --no-install-recommends \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Bitbucket pipeline is then used to install any npm packages, initialise any data needed in the database and then runs the test suite.

This is the Dockerfile in it's entirety:

# If changing node version, make sure the version is officially supported!
# - encountered a node: not found error when using a non-officially supported version.
FROM node:6.10 

# create a data/db folder for mongo to store data in.
RUN mkdir -p /data/db

# Install mongodb
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 \
  && echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list \
  && apt-get update \
  && apt-get install -y mongodb-org --no-install-recommends \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Docker Pull Command
Owner
shiftdigital

Comments (0)