This topic describes commands supported by Image Builder, including specific Dockerfile commands. Familiarize yourself with the commands to get started with Image Builder.
The following table describes the commands supported by Image Builder.
Command | Format or example | Description |
FROM |
| Specify a source image.
Note If you specify a |
COMPONENT |
| Specify image components. You can specify system components or custom components. The command is applicable only to image templates. When you create an image template, you can run the command to specify one or more image components in the image template. |
RESTART |
| Restart the instance. Do not add parameters to the command. |
RUN |
| Build an image. The command can be split into multiple lines. An escape character (\) must be added to the end of each line except for the last line. |
ENV |
| Configure environment variables. Pass environment variables in the key="value" format into the command. Note Double quotation marks (") are required before and after the value of each environment variable in the command. Example: |
WORKDIR |
| Configure working directories. |
COPY |
| Copy files. Note Network files must be downloaded by using the |
USER |
| Specify a user. Note Set the |
LABEL |
| Add metadata to the image template. The command can be split into multiple lines. An escape character (\) must be added to the end of each line except for the last line. |
CMD |
| Specify commands that run on instance startup. |
ENTRYPOINT |
| Specify commands that run on instance startup. |
References
For more information about Dockerfile commands, such as the differences between CMD
and ENTRYPOINT
commands, see Dockerfile reference.