File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 33 "build" : {
44 "dockerfile" : " ./Dockerfile"
55 },
6- "postStartCommand" : " sudo rm /var/run/docker.pid; sudo dockerd" ,
76 "workspaceFolder" : " /workspaces/${localWorkspaceFolderBasename}" ,
7+ "postStartCommand" : " bash .devcontainer/docker-startup.sh" ,
88 "hostRequirements" : {
99 "cpus" : 2 ,
1010 "memory" : " 8gb" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Check if dockerd is already running
5+ if ! pgrep -x dockerd > /dev/null; then
6+ echo " Starting Docker daemon..."
7+ sudo dockerd --log-level=error > /tmp/dockerd.log 2>&1 &
8+ sleep 2
9+ fi
10+
11+ # Wait for Docker to be ready
12+ until docker ps > /dev/null 2>&1 ; do
13+ echo " Waiting for Docker..."
14+ sleep 1
15+ done
16+
17+ echo " Docker is ready!"
You can’t perform that action at this time.
0 commit comments