Cleanup in docker installation


#1

Hi all!

I’ve been trying to run cleanup command in on-premise installation. It was installed using official guide with docker.

I try to run such command:
docker run -i -t --link srv_redis_1:redis --link srv_postgres_1:db --net srv_default --name=“sentry” sentry:latest cleanup --days=15

and got such error:
sentry.runner.importer.ConfigurationError: Exception: Error: REDIS_PORT_6379_TCP_ADDR (or SENTRY_REDIS_HOST) is undefined, did you forget to --link a redis container?

output of ps command:
docker ps --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2448ada38ae5 srv_worker “/entrypoint.sh run …” 2 weeks ago Up 2 hours 9000/tcp srv_worker_1
015bb0660d14 srv_web “/entrypoint.sh run …” 2 weeks ago Up 2 hours 0.0.0.0:9000->9000/tcp srv_web_1
8b24ee8cc3e6 srv_cron “/entrypoint.sh run …” 2 weeks ago Up 2 hours 9000/tcp srv_cron_1
5eb356839802 memcached:1.4 “docker-entrypoint.s…” 2 weeks ago Up 2 hours 11211/tcp srv_memcached_1
a3c6cc837cef redis:3.2-alpine “docker-entrypoint.s…” 2 weeks ago Up 2 hours 6379/tcp srv_redis_1
4f9533a02d7f srv_base “/entrypoint.sh run …” 2 weeks ago Up 2 hours 9000/tcp srv_base_1
32ed57030747 tianon/exim4 “entrypoint.sh tini …” 2 weeks ago Up 2 hours 25/tcp srv_smtp_1
309eb1a9da66 postgres:9.5 “docker-entrypoint.s…” 2 weeks ago Up 2 hours 5432/tcp srv_postgres_1

How do you run cleanup command with docker?