scf-repo
on the public image page to view the image information.# Pull the SCF source imagedocker pull ccr.ccs.tencentyun.com/scf-repo/scf-runtimes-image:latest
sudo
before the command and try again./scf/lang/
directory.
As the SCF source image contains all runtimes, it is relatively large. Please refer to the following table and choose a runtime image according to your needs.Runtime | Address |
SCF | ccr.ccs.tencentyun.com/scf-repo/scf-runtimes-image:latest |
Go 1.8 | ccr.ccs.tencentyun.com/scf-repo/runtime-go1:latest |
Python 2.7 | ccr.ccs.tencentyun.com/scf-repo/runtime-python2:latest |
Python 3.6 | ccr.ccs.tencentyun.com/scf-repo/runtime-python3:latest |
PHP 5.6 | ccr.ccs.tencentyun.com/scf-repo/runtime-php5:latest |
PHP 7.2 | ccr.ccs.tencentyun.com/scf-repo/runtime-php7:latest |
Java 8 | ccr.ccs.tencentyun.com/scf-repo/runtime-java8:latest |
Node.js 6.10 | ccr.ccs.tencentyun.com/scf-repo/runtime-node6:latest |
Node.js 8.9 | ccr.ccs.tencentyun.com/scf-repo/runtime-node8:latest |
Node.js 10.15 | ccr.ccs.tencentyun.com/scf-repo/runtime-node10:latest |
Node.js 12.16 | ccr.ccs.tencentyun.com/scf-repo/runtime-node12:latest |
scf:python3
tag as an example. Run the following command to retag the image:docker pull ccr.ccs.tencentyun.com/scf-repo/runtime-python3:latest# Run this command to find the IMAGE ID and copy itdocker images# docker tag IMAGE_ID REPOSITORY:TAGdocker tag 0729ecc15d37 scf:python3
scf:python3
in the sample with ccr.ccs.tencentyun.com/scf-repo/runtime-python3:latest
.docker pull ccr.ccs.tencentyun.com/scf-repo/runtime-node12:latest# Run this command to find the IMAGE ID and copy itdocker imagesdocker tag d64a665357b6 scf:node12
/path/to/your_project
directory to the /tmp/your_project
directory in the container as an example.docker run -it -v /path/to/your_project:/tmp/your_project scf:node12 /bin/bash
cd
command to enter the directory in the container. Then, run the npm
command to install NodeJieba in this directory as shown below:cd /tmp/your_projectnpm install nodejieba --save
/path/to/your_project
directory. Run the exit
command to exit the container as shown below:# Exit the containerexit
docker pull ccr.ccs.tencentyun.com/scf-repo/runtime-python3:latest# Run this command to find the IMAGE ID and copy itdocker imagesdocker tag d64a665357b6 scf:python3
docker run -it -v /path/to/your_project:/tmp/your_project scf:node12 /bin/bash
docker exec
command to enter the container for development as shown below:docker ps# Get the CONTAINER IDdocker exec -it CONTAINER_ID /bin/bash
# Get the container IDdocker ps# Save the image locally# docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]docker commit db47b8e66e64 scf:myimage
Was this page helpful?