# Switch to the file download directorycd /opt# Download Demogit clone https://github.com/awesome-scf/scf-custom-container-code-snippet.git# Log in to the image repository. Replace $YOUR_REGISTRY_URL with your image repository, and replace $USERNAME and $PASSWORD with your login credentials respectively.docker login $YOUR_REGISTRY_URL --username $USERNAME --password $PASSWORD# Build images. Replace $YOUR_IMAGE_NAME with your image address.docker build -t $YOUR_IMAGE_NAME .# Push imagesdocker push $YOUR_IMAGE_NAME
Parameter | Operation |
Function type | Select Event-triggered function or HTTP-triggered Function. |
Function name | Define the function name. |
Region | Select the region where to deploy the function. The function must be in the same region as the image repository. |
time zone | SCF uses the UTC time by default, which you can modify by configuring the TZ environment variable. After you select a time zone, the TZ environment variable corresponding to the time zone will be added automatically. |
Images | Select the Personal Edition or Enterprise Edition image repository you created. |
Image tag | Select the image tag. If this parameter is left empty, the latest version of the image will be used by default. |
Entrypoint | Enter the bootstrap command of the container. Parameter input specification: enter an executable command, such as a python command. This parameter is optional. If it is left empty, the Entrypoint value in the Dockerfile will be used by default. |
CMD | Enter the bootstrap parameter of the container. Parameter input specification: use "space" as the parameter separator, for example, -u app.py . This parameter is optional. If it is left empty, the CMD value in the Dockerfile will be used by default. |
Image acceleration | Enable image acceleration as needed. After image acceleration is enabled, SCF can pull images more efficiently. It takes over 30 seconds to enable image acceleration, so please be patient. |
Was this page helpful?