Skip to content

Instantly share code, notes, and snippets.

@almokhtarbr
Created December 31, 2021 16:01
Show Gist options
  • Save almokhtarbr/1ab3c2d853dfeac41a71829943ffe01e to your computer and use it in GitHub Desktop.
Save almokhtarbr/1ab3c2d853dfeac41a71829943ffe01e to your computer and use it in GitHub Desktop.

add this to docker-composefile after build line

stdin_open: true
tty: true

to be like this

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        RUBY_VERSION: '2.7.2'
        NODE_MAJOR: '15'
        BUNDLE_VERSION: '2.2.1'
    stdin_open: true
    tty: true

then add debugger to your code.

then to access to debugger attach your container by docker compose container_id

voila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment