- Register on the Yandex Cloud service and install Yandex Cloud (CLI).
- Obtain an authentication token.
- Install Docker Desktop and enable virtualization support if necessary.
- Using the Dockerfile, build the image:
Note the dot at the end!
docker build -t search .
- Run the container locally based on the image and expose port 80 externally:
docker run -d search
- Verify the bot's functionality.
- Connect the "container registry" from Yandex and publish the image there:
yc container registry create test-registry yc container registry configure-docker
- Obtain your registry ID and publish the file there:
Here
docker tag search cr.yandex/crp******/search:test docker push cr.yandex/crp******/search:test
crp******
is your registry ID.
- Obtain your registry ID and publish the file there:
- Go to the virtual machines section on the Yandex Cloud console.
- Create a new virtual machine and specify the image link instead of choosing the operating system.
- Specify the service account and SSH public key.
- Create and start the virtual machine.
- Connect to it using SSH; otherwise, the bot will not start.
The publication was successful.