Configuring a Container definition

In this section, we shall discuss creating a container definition for a MySQL database:

  1. Click on Configure for the Custom Container definition, as shown in the following screenshot. Some other container definitions are available as examples:
  1. In the Edit container dialog, specify a Container name (mysql) and specify Image as mysql, as shown in the following screenshot.
  1. Specify a Soft limit (512) and a Hard limit (1024) for memory. The hard limit for memory must not be less than the soft limit:
  1. Specify the Container port as 3306 in Port Mappings, with the Protocol as tcp, as shown in the following screenshot. With the Fargate launch type, only container port mappings may be configured. Host port mappings are not valid, and are set to the same value as the container port mappings:
  1. In the Advanced container configuration | ENVIRONMENT section, specify the mandatory environment variable for the mysql Docker image. The mandatory environment variable is MYSQL_ROOT_PASSWORD and sets the password for the root user, as shown in the following screenshot. Optionally, specify other environment variables such as MYSQL_DATABASE for the database to create.
  1. The Essential checkbox indicates whether a container is essential to the running of a task. If the Essential checkbox is selected, the container is essential, and if the container fails, the task fails too. At least one container in a task definition must be set as Essential. As the mysql container is the only container, it must be set to Essential:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.82.217