- If you previously ran
InstaPy
the classical way you have to mountInstaPy
logs folder, which is by default saved in your home directory~/InstaPy
, into the container otherwise you will loose all your previous data - Copy the quickstart example file from
docker-compose
directory to get started - Edit the file
docker_quicktart.py
to personalize how InstaPy will interact. All functions are the same than 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. - Start InstaPy container
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
- Stop InstaPy container
docker stop instapy
- Remove InstaPy container
docker rm instapy
- Display InstaPy output logs
docker logs -f instapy
ordocker logs --tail 50 -f $(docker ps -a | grep instapy | cut -d " " -f 1)
- Using specific version of InstaPy
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 bothlatest
with the desire released version of InstaPy. It will then start a container of InstaPy with the corresponding version.
- Clone this repository
git clone https://github.com/InstaPy/instapy-docker.git
- Change your directory to docker-compose
cd docker-compose
- If you previously ran
InstaPy
the classical way you have to moveInstaPy
logs folder, which is by default saved in your home directory~/InstaPy
, into the current folder otherwise you will loose all your previous datamv ~/InstaPy .
- Copy the quickstart example file to get started
cp -a docker_quickstart.py.example docker_quickstart.py
- Edit the file
docker_quicktart.py
to personalize how InstaPy will interact. All functions are the same than 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. - Start InstaPy container
docker-compose pull && docker-compose up -d --build web
- Stop InstaPy container
docker-compose stop web
- Stop and remove Docker configs
docker-compose down
- Display InstaPy output logs
docker logs -f instapy_web_1
ordocker logs --tail 50 -f $(docker ps -a | grep instapy_web | cut -d " " -f 1)
- Automatically run InstaPy or run it at a speified time (Example below: run it everyday at 8:30AM)
- Edit your crontab file
- Add
30 8 * * * root cd /path_to_repo/docker-compose/ && docker-compose up -d --build
- Using specific version of InstaPy
By default, you will use the latest version of InstaPy. For some reasons, if you want to run a specific version you have to editdocker-compose.yml
file and replacelatest
with the desire released version in the lineimage: instapy/instapy:latest
. It will then start a container of InstaPy with the corresponding version.