2

Final goal: To deploy a ready-made cryptocurrency exchange on AWS.

I have setup a readymade server by 0xProject by running the following command on my local machine:

npx @0x/launch-kit-wizard && docker-compose up

This command creates a docker-compose.yml file which has multiple container definitions and starts the exchange on http://localhost:3001/

I need to deploy this to AWS for which I'm following this Youtube tutorial

  • I have created a registry user with appropriate permissions
  • An EC2 instance is created
  • ECR repository is created
  • AWS CLI is configured

As per AWS instructions, I'm retrieving an authentication token and authenticating Docker client to registry:

aws ecr get-login-password --region us-east-2 | docker login --username AWS --password-stdin <docker-id-given-by-AWS>.dkr.ecr.us-east-2.amazonaws.com

I'm trying to build the docker image:

docker build -t testdockerregistry .

Now, since in this case, we have docker-compose.yml instead of Dockerfile - when I try to build the image - it throws the following error:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: CreateFile C:\Users\hp\Desktop\xxx\Dockerfile: The system cannot find the file specified.

I tried building image from docker-compose itself as per this guide, which fails with the following message:

postgres uses an image, skipping
frontend uses an image, skipping
mesh uses an image, skipping
backend uses an image, skipping
nginx uses an image, skipping

Can anyone please help me with this?

2
  • It seems like your docker-compose just references images, can you confirm if they're public or private? Commented Jun 22, 2020 at 18:06
  • @ChrisWilliams They're public yeah! Commented Jun 22, 2020 at 18:14

2 Answers 2

1

You can use the aws ecs cli-compose command from the ECS CLI.

By using this command it will translate the docker-compose file you create into a ECS Task Definition.

If you're interested in finding out more about the CLI take a read of the AWS documentation here.

Sign up to request clarification or add additional context in comments.

Comments

1

Another approach, instead of using the AWS ECS CLI directly, is to use the new docker/compose-cli

This CLI tool makes it easy to run Docker containers and Docker Compose applications in the cloud using either Amazon Elastic Container Service (ECS) or Microsoft Azure Container Instances (ACI) using the Docker commands you already know.

See "Docker Announces Open Source Compose for AWS ECS & Microsoft ACI " from Aditya Kulkarni.
It references "Docker Open Sources Compose for Amazon ECS and Microsoft ACI" from Chris Crone, Engineer @docker:

While implementing these integrations, we wanted to make sure that existing CLI commands were not impacted.
We also wanted an architecture that would make it easy to add new backends and provide SDKs in popular languages. We achieved this with the following architecture:

https://res.infoq.com/news/2020/10/docker-announces-compose-ecs-aci/en/resources/1CLI%20Architecture-1602557186982.png

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.