Home / Companies / LocalStack / Blog / Post Details
Content Deep Dive

Running LocalStack on Jenkins with Docker-in-Docker

Blog post from LocalStack

Post Details
Company
Date Published
Author
Kosta Mushkin
Word Count
1,219
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

In environments where Docker socket mounting is not allowed due to security policies, Docker-in-Docker (DinD) provides a viable alternative for setting up LocalStack on Jenkins. This approach isolates Jenkins and LocalStack within a dedicated Docker daemon inside a container, enhancing security by avoiding root-equivalent access to the host Docker daemon. The setup involves using a custom Jenkins image and a docker:dind container, with both running on a shared Docker bridge network, allowing Jenkins to communicate with LocalStack through the DinD daemon. Although this method requires running DinD containers in privileged mode, it is often more acceptable than exposing the host Docker socket to every CI job. The pipeline setup remains largely unchanged from the previous socket mounting approach, with the main difference being how Jenkins connects to LocalStack, which is now through a mapped port from the DinD daemon. Despite the slightly higher setup complexity, DinD offers stronger build isolation and is suitable for security-restricted pipelines, making it a strategic choice over socket mounting when needed.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.