While I was trying to convert Docker compose file with the container transform I got the following error:
Container "container-name" is missing required parameter 'image'.
Services with the image parameter, it operates fine. However, the ones with the build parameter instead of the image cause error. I want to build some of the images based on a Dockerfile by using a build parameter and I don't need an image parameter in the Docker compose file at all. What would be the most effective solution here?
Here is an example:
Successfull transformation for db
service:
Docker-compose.yml:
db:
image: postgres
Dockerrun.aws.json:
"containerDefinitions": [
{
"essential": true,
"image": "postgres",
"memory": 128,
"mountPoints": [
{
"containerPath": "/var/lib/postgresql/data/",
"sourceVolume": "Postgresql"
}
],
"name": "db"
}
Unsuccessfull transformation for web
service since build
used instead of image
parameter:
Docker-compose.yml:
web:
build:
context: .
dockerfile: Dockerfile