Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.1K
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda