Editing the Dockerfile Directly

InstallAnywhere 2020 SP2

A Dockerfile is a text file that contains all of the commands that will be used to build your Docker container. InstallAnywhere edits this file as you configure your Docker container configuration in the Build Containers view on the Build page. This file is also available for edit for advanced users.

For example, advanced users may want to edit the Dockerfile to run a series of apt-get commands or perform network configuration tasks.

Caution:InstallAnywhere does not validate the syntax of the Dockerfile changes that users make. Any syntactical error in the Dockerfile may result in build failure. Thus, editing the Dockerfile is recommend only for advanced users who are proficient in editing this file and writing valid syntax for it.

To edit the Dockerfile for your Docker container:

1. In the Advanced Designer, on the Build page, click Build Containers. The Build Containers view opens.
2. In the Docker Configuration area, in the Choose Container Configuration setting, select the configuration that you want to configure.
3. In the Base Image Configuration area, in the Edit Dockerfile setting, click the View/Edit button. The Edit Dockerfile dialog box opens.
4. Edit the Dockerfile as needed. To retain your changes in subsequent loads of the project, ensure that you make all of your changes between the two <<User-defined commands to go here>> comment lines.
5. Click the Save button.

The next time that you build your Docker container, InstallAnywhere uses the Dockerfile that you edited to create your container.

See Also