Skip to content

Instantly share code, notes, and snippets.

@bearandhammer
Created April 10, 2022 18:26
Embed
What would you like to do?
A set of utility files for using Docker on Windows using WSL 2 (with a sample docker-compose to get started).
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=2GB
# Sets the VM to use two virtual processors
processors=2
# Turn off default connection to bind WSL 2 localhost to Windows localhost
localhostforwarding=true
# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
debugConsole=true
version: '3.1'
services:
sql-server-db:
container_name: sql-server-db
image: mcr.microsoft.com/mssql/server:2017-latest
restart: always
ports:
- "1433:1433"
environment:
SA_PASSWORD: "{YOUR_STRONG_PASSWORD}"
ACCEPT_EULA: "Y"
mongo:
image: mongo:latest
container_name: mongo-db
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: {PASSWORD}
ports:
- 27017:27017
mongo-express:
image: mongo-express:0.54
container_name: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: {PASSWORD}
depends_on:
- mongo
[boot]
command = service docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment