Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Latest commit

 

History

History
87 lines (55 loc) · 2.31 KB

README.md

File metadata and controls

87 lines (55 loc) · 2.31 KB

Archived

This repository was useful at a time when gordalina/cachetool didn't provide a docker image. It 's no longer the case, so we've archived it.


docker-cachetool

DockerHub Badge

gordalina/cachetool is a CLI App and library to manage apc & opcache. https://gordalina.github.io/cachetool/

Usage

The image entrypoint is set to /opt/cachetool/bin/cachetool, so running cachetool via docker looks like:

docker run --rm sbitio/cachetool [options] [arguments]

Example usage with web adapter:

APPDIR="/var/www/example.com"
DOCROOT="/var/www/example.com/current/web"
URL="http://example.com"
docker run --rm -v $APPDIR:$APPDIR -w $DOCROOT sbitio/cachetool cachetool --web --web-url=$URL [options] [arguments]

If the website is behind a proxy and/or load balancer you may want to ask directly the webserver instead of the public facing ip. Additionally, the webserver may be listening in another port. This is an example for running cachetool from the webserver host in such a setup:

DOMAIN="example.com"
PORT="8008"
APPDIR="/var/www/example.com"
DOCROOT="/var/www/example.com/current/web"
URL="http://$DOMAIN:$PORT"

docker run --rm --add-host $DOMAIN:172.17.0.1 -v $APPDIR:$APPDIR -w $DOCROOT sbitio/cachetool --web --web-url=$URL [options] [arguments]

Customizations

Using another local codebase

You may want to quickly test a change in the codebase before contributing a PR. A quick way to do it is mounting your local copy on the docker image.

CACHETOOL_CODEBASE=/usr/src/cachetool

docker run --rm $CACHETOOL_CODEBASE:/opt/cachetool sbitio/cachetool

Building an image with another fork

You may want to build an image based on a fork or git reference:

GIT_URL=https://github.com/gordalina/cachetool
GIT_REF=5.0.0
docker build . --build-arg REPOSITORY=$GIT_URL --build-arg REF=$GIT_REF -t cachetool:<tag>

Development

Development happens on GitHub.

Please log issues for any bug report, feature or support request.

Pull requests are welcome.

License

MIT License, see LICENSE file

Contact

Use contact form on http://sbit.io