You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a custom dockerfile to integrare docker in docker on kubernetes, the problem is that to do so I have to install the coder server and launch it as a post-hook, and this seems to break the healthcheck from the UI and therefore I am not able to connect to the pod terminal from the UI.
I tried using this startup-script that gets ran as a post start command:
#!/usr/bin/env bash
set -eu
# Error handling - to preserve logs in case of failure
waitonexit() {
echo "=== Agent script exited with non-zero code ($?). Sleeping 1h to preserve logs..."
sleep 3600
}
trap waitonexit EXIT
# Create a directory with the right permissions
CODE_SERVER_DIR="/home/coder/.local/code-server"
mkdir -p "$CODE_SERVER_DIR"
# Install the latest code-server
echo "Installing code-server..."
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix="$CODE_SERVER_DIR"
# Ensure correct permissions
chmod -R 755 "$CODE_SERVER_DIR"
# Start code-server in the background
echo "Starting code-server..."
"$CODE_SERVER_DIR/bin/code-server" --auth none --port 13337 >/tmp/code-server.log 2>&1 &
# Verify code-server is running
sleep 2
if ! ps aux | grep -v grep | grep code-server > /dev/null; then
echo "WARNING: code-server may have failed to start, check logs"
cat /tmp/code-server.log
else
echo "code-server is running"
fi
# If the script completes successfully, remove the trap
trap - EXIT
echo "Startup script completed successfully"
EOT
Same as before, the agent is started but from the UI im not able to connect to the workspace even if the pod is running.
How can I start the agent without changing the container command:
This discussion was converted from issue #17759 on May 14, 2025 07:58.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there an existing issue for this?
Current Behavior
I am using a custom dockerfile to integrare docker in docker on kubernetes, the problem is that to do so I have to install the coder server and launch it as a post-hook, and this seems to break the healthcheck from the UI and therefore I am not able to connect to the pod terminal from the UI.
This is the Dockerfile:
This is the template:
And this is the healthcheck from inside the container (sometimes expired sometimes alive):
Relevant Log Output
Expected Behavior
I would like to be able to integrate docker in docker without compromising coder.
Steps to Reproduce
Environment
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions