Unable to ssh multiple containers Azure app service

Ken Fly 41 Reputation points

Hi, we have a shared custom dockerfile used by diff Azure app service. Just start by diff commands.

One app service A is a single container, we run ruby on rails service there by command bundle exec rails s, and I have no issue to ssh to the rails container.

The other app service B is multiple containers by docker-compose file below

version: '3'  
    image: 'example.com/exampledocker'  
    command: ruby -run -e httpd sidekiq_hc -p 5000  
    restart: always  
      - '5000:5000'  
    restart: always  
    image: 'example.com/exampledocker'  
    command: bundle exec sidekiq  
      - DOCKER=true  
      - RAILS_ENV=production  

However, no matter whatever I tried, I cannot ssh to either of the container.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,051 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 22,751 Reputation points Microsoft Employee

    @Ken Fly , okay, since you have to SSH configured in your custom image, the only thing I can think of is looking at your docker compose, you don't have PORT 2222 opened on your docker compose. Now having said that, you I don't think you'll be able to SSH into both containers. The platform uses PORT 2222 for SSH traffic of your app service to the image that's bound for HTTP traffic. Therefore, I don't think you'll be able to SSH into both images in your multi-container app.