Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

govuk-docker

> 编程语言
Open source

GOV.UK development environment using Docker

100 stars0 likes1 views
WebsiteGitHub

About

GOV.UK development environment using Docker

GOV.UK Docker

GOV.UK development environment using Docker.

The GOV.UK website uses a microservice architecture. Developing in this ecosystem is a challenge, due to the range of environments to maintain, both for the app being developed and its dependencies.

The aim of govuk-docker is to make it easy to develop any GOV.UK app. It achieves this by providing a variety of environments or stacks for each app, in which you can run commands, and the app itself.

RFC 106: Use Docker for local development describes the background for choosing Docker. See the list of projects which work with govuk-docker.

Installation

First make sure you have the following dependencies.

  • brew
  • git
  • A govuk directory in your home directory

Next, add the following line to your bash/zsh config.

bash
# in ~/.bashrc or ~/.zshrc
export PATH=$PATH:${HOME}/govuk/govuk-docker/exe

Run echo $SHELL if you're not sure which shell you use. After saving, you will need to run source ~/.bashrc or source ~/.zshrc to apply this change to your current terminal session.

Now in ~/govuk , run the following setup commands.

bash
git clone [email protected]:alphagov/govuk-docker.git
cd govuk-docker
bin/setup

Check the troubleshooting guide if you have a problem.

Then make sure you give Docker enough resources.

Running GOV.UK applications can be resource intensive. To give Docker more resources on Mac, click the Docker whale icon in the macOS menu bar, select 'Preferences'. We suggest the following minimum resources:

  • 6 CPUs
  • 12 GB RAM
  • 64GB+ Disk

Check out the how-to guide to customise your setup.

  • Replicate data locally

  • Setup shortcuts to reduce typing

Usage

Do this the first time you work on a project:

bash
make [app-name]

...where app-name is the name of the app you want to build. For example, if you want to make collections-publisher you would run:

bash
make collections-publisher

Check the troubleshooting guide if you have a problem.

Each project provides a number of 'stacks' for different use cases. You can see the stacks for a project in its config file. To provide consistency, all projects should follow these conventions for stacks:

The lite stack

This stack provides only the minimum number of dependencies to run the project code. This is useful for running the tests, or a Rails console, for example.

Do this to run the tests for a project:

bash
govuk-docker run [app-name]-lite bundle exec rake

Check the troubleshooting guide if you have a problem.

The app stack

This stack provides the dependencies necessary to run an app e.g. in a browser. If the app is a web app, you will then be able to visit it in your browser at app-name.dev.gov.uk.

Do this to start a GOV.UK web app:

bash
govuk-docker up [app-name]-app

Replicate data locally (or use the app-live stack or app-integration stack).

Check the troubleshooting guide if you have a problem.

The app-* stacks

Variations on the app stack are allowed where necessary such as:

  • app-draft: used for testing the authenticating-proxy against a draft version of the router app.
  • app-live: used to test a read-only frontend app against live GOV.UK APIs (avoids having to replicate data locally).
  • app-integration: used to test a read-only frontend app against integration GOV.UK APIs (avoids having to replicate data locally, without risking degradation in the live production service). See the how to guide

Some app stacks also depend on a worker stack, to run asynchronous tasks [example].

Resources

  • Troubleshooting guidance
  • How-to guidance
  • Learning GOV.UK Docker

Contributing

Check out the CONTRIBUTING guide.

Licence

MIT License

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubygovuk

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言