- Prerequisite
- Start InstaPy container
- Stop InstaPy container
- Remove InstaPy container
- Display InstaPy output logs
- Deploy specific version of InstaPy
If you previously ran InstaPy
the classical way you have to mount InstaPy
logs folder, which is by default saved in your home directory ~/InstaPy
, into the container otherwise you will loose all your previous data like blacklist, log files, accounts followed, accouants unfollowed.
- Copy the quickstart example file named
docker_quickstart.py
fromdocker-compose
- Edit the file
docker_quicktart.py
to personalize how InstaPy will interact. All functions are the same than with the classic installation mode. If you are new to InstaPy, we strongly suggest to have a look to InstaPy documentation to fully understand this file and how to modify it. Keep in mind all InstaPy functions should start withbot.
when running with Docker.
docker pull instapy/instapy:latest && \
docker run --name instapy \
-v /absolute_path_to_file/docker_quickstart.py:/code/docker_quickstart.py \
-v /absolute_path_to_file/InstaPy:/code/InstaPy \
-d instapy/instapy:latest
Example:
docker pull instapy/instapy:latest && \
docker run --name instapy \
-v /home/myuser/docker_quickstart.py:/code/docker_quickstart.py \
-v /home/myuser/InstaPy:/code/InstaPy \
-d instapy/instapy:latest
docker stop instapy
Make sure the container is already stopped or first stop it the above command, then run
docker rm instapy
Use one of the two following commands
docker logs -f instapy
docker logs --tail 50 -f $(docker ps -a | grep instapy | cut -d " " -f 1)
By default, you will use the latest version of InstaPy. For some reasons, if you want to run a specific version you could with adapting the starting command (see above) by replacing tag latest
with the desire released version of InstaPy.
It will then start a container of InstaPy with the corresponding version. Please be aware breaking chanes may exist between version and refers to the changelog of InstaPy to adapt your quickstart file.