Back to articles

GOVUK prototype docker image

If you’ve never used docker then there is a great getting started guide over on docker.com.

If you’ve ever been in a situation where you can’t access npm then this might be a useful tutorial to use.

Getting started

You’ll need docker installed - I’ve usually done this via brew.

Once installed if you have a current prototype from terminal in the same folder you can run:

Terminal window
docker run -v ./app:/app -p 3000:3000 docker.io/htmlandbacon/govuk-prototype-kit

This will mount your app folder within docker and expose the application running on 3000.

This avoids needing to install packages.

If you don’t have a current app folder then you will need the following files setup:

/app/assets/javascripts/application.js
/app/assets/sass/application.scss
/app/data/session-data-defaults.js
/app/views/layouts/main.html
/app/views/index.html
/app/config.json
/app/filters.js
/app/routes.js