Unable to ssh multiple containers Azure app service

Ken Fly 46 Reputation points
2022-10-25T00:24:27.107+00:00

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'  
services:  
  healthcheck:  
    image: 'example.com/exampledocker'  
    command: ruby -run -e httpd sidekiq_hc -p 5000  
    restart: always  
    ports:  
      - '5000:5000'  
  sidekiq:  
    restart: always  
    image: 'example.com/exampledocker'  
    command: bundle exec sidekiq  
    environment:  
      - 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.
7,778 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,191 Reputation points Microsoft Employee
    2022-10-28T14:23:44.53+00:00

    @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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.