DEV Community

Cover image for Debug your Go app in a Docker Container
Rémi Lavedrine
Rémi Lavedrine

Posted on • Edited on

Debug your Go app in a Docker Container

Photo by Kevin Ku on Unsplash


Recently, I discovered that you can develop in a Docker Container in a very simple manner using VSCode with two extensions, Remote Containers and Docker.

If you have Docker installed on your machine and VSCode with these two extensions, you can develop any application in a Docker container using any language or framework in any version.
And you can also share that exact configuration to anyone in your team (pretty useful according to me).


My side project is a Go application which helps for Pentesting Android application as it deobfuscate application, repackage and reinstall a instrumented application on you android device.
See it here if you're interested

GitHub logo Shosta / androSecTest

From this app, Connect a Phone, Extract any app from It, Decompile, Deobfuscate, Remove Certificate Pinning and Repackage it. Meanwhile, Perform some Static and Dynamic Analysis on It.

Ask me anything Maintained GitHub stars GitHub forks GitHub license Pentest

Android-Static-Security-Audit

Here is a quick Cheat Sheet to test the security of an Android app that AndroSecTest is doing.

You can have a quick look at how the application is pentesting an Android app on Youtube : https://youtu.be/zzyTFjnwolo

Easiest Way to Try It

Use the docker Container

  1. Build the Docker Container that has all the dependencies and tools already installed.

    docker build .

  2. Connect your Android Device

    2.1. Be sure that the "adb server" is not running on the host machine as an android phone can only be connected to one adb server at a given time.

    2.2. USB connection is not working from host device to Container on MacOS, so it is only working on a Linux host for the time being.

  3. Run the Docker Container

    docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb "The Container ID"

    3.1 -it is here so that we can have an iteractive session.

    3.2. --privileged

But enough talking about this application.
I had a hard time figuring out how to debug my Go application in a Docker container and I made a video and this post so that you are not going to waste your time figuring out how to set everything up properly.


Just follow the steps described in that video (french audio, english subtitles).


If you like this content, push the like button, that helps spread the message. 👍🏼
If you think it can be useful to anyone in your network, share it. 📨


Video produced by Wild & Secure, your consulting firm to all things security and real estate.
If you want to receive weekly quality content about security, subscribe to our newsletter on our website.

Top comments (0)