Trying docker pull nginx from Go to the Frontend

After trying docker ps, I wanted to try something that was not instant…

That is why I made dockerNginxHandler to run docker pull nginx:latest from Go. I chose that command because docker ps returns almost immediately, while docker pull nginx:latest actually needs time to download the image first… so the output is not instant.

On the frontend, I added a button to call /api/docker/nginx and show the result on the page.

This made the limitation more obvious… I had to wait around 10 seconds before the output appeared in the frontend. So it worked, but it did not feel realtime yet.

That small experiment helped me see the next problem more clearly… for longer-running commands, I probably need log streaming instead of waiting for the final output.

© 2026 Wahyu Syahputra. All rights reserved.