Sign inSign up

udogg/gdb-container

By udogg

Updated over 1 year ago

docker image for editing C code and using GDB instead of lldb in MacOS, my daily driver.

Image
Languages & frameworks
Databases & storage
0

164

udogg/gdb-container repository overview

Example Docker Workflow

==========================

macOS (~/.zshrc)


Step 1: Navigate to Your Project Directory

Use the alias c473 to quickly navigate to your project directory:

c473
Step 2: View Existing Docker Containers

List all Docker containers to see which ones are running or stopped:

dps
Step 3: Pull the Latest Image from Docker Hub

Ensure you have the latest image by pulling it from Docker Hub:

dpull
Step 4: Start or Attach to a Docker Container

Start or attach to the goofy_lumiere container using the drun function:

drun
Step 5: Work Inside the Container

Once inside the container, you can compile your code using the comp alias:

comp
Step 6: Commit Changes to the Container (Optional)

If you've made changes and want to save them as a new image:

dcommit <container_id> udogg/gdb-container:v1
Step 7: Push the Committed Image to Docker Hub

Push the committed image to Docker Hub:

dpush udogg/gdb-container:v1
Step 8: Clean Up Unwanted Images

After pushing, remove the local image to save disk space:

drmi udogg/gdb-container:v1
Step 9: Automatically Commit, Push, and Remove (Optional)

Streamline the commit, push, and remove process into one step:

dpr <container_id> udogg/gdb-container:v1
Step 10: Running a Disposable Container

If you need to run a container temporarily, use the drun_rm alias:

drun_rm
Step 11: Exit the Container

To exit the container, simply type:

exit

or press Ctrl + D.

Additional Resources

For more details, visit the Docker Documentation.

Linux (~/.bashrc)


For linux, it is mostly the same as macos because macos is unix based just edit ~/.bashrc instead of ~/.zshrc

Tag summary

Content type

Image

Digest

sha256:e5942d0fc

Size

1.3 GB

Last updated

over 1 year ago

docker pull udogg/gdb-container:v1