Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
ECS Fargate does not support bind mounts

I am trying to deploy a nodejs docker-compose app into aws ecs, here is how my docker compose file looks -

version: '3.8'

services:
 sampleapp:
  image: jeetawt/njs-backend
  build:
   context: .
  ports:
   - 3000:3000
  environment:
   - SERVER_PORT=3000
   - CONNECTIONSTRING=mongodb://mongo:27017/isaac
  volumes:
   - ./:/app
  command: npm start

 mongo:
  image: mongo:4.2.8
  ports:
   - 27017:27017
  volumes:
   - mongodb:/data/db
   - mongodb_config:/data/configdb
volumes:
 mongodb:
 mongodb_config:

However when i try to run it using docker compose up after creating ecs context, it throws below error -

WARNING services.build: unsupported attribute        
ECS Fargate does not support bind mounts from host: incompatible attribute

I am not specifying any where that I would like to use Fargate for this. Is there any way I can still deploy the application using ec2 instead of Fargate?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Default mode is Fargate. You presumably have not specified an ecs cluster with ec2 instances in your run command.

Your docker compose has a bind mount so your task would need to get deployed to an instance where the mount would work.

This example discusses deploying to an ec2 backed cluster. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cli-tutorial-ec2.html

over 4 years ago · Santiago Trujillo Relatório

0

Fargate is the default and there is no way to tell it that you want to deploy on EC2 instead. There are however situations where we have to deploy on EC2 when Fargate can't provide the required features (e.g. GPUs).

If you really really need to use bind mounts and need an EC2 instance you may use this trick (I haven't done it so I am basically brainstorming here):

  • configure your task to use a GPU (see examples here)
  • Convert your compose using docker compose convert
  • Manually edit the CFN template to use a different instance type (to avoid deploying a GPU based instance with its associated price)
  • Deploy the resulting CFN template.

You may even be able to automate this with some sed circus if you really need to.

As I said, I have not tried it and I am not sure how viable this could be. But it wouldn't be too complex I guess.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda