This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
ARG REPOSITORY=https://github.com/gordalina/cachetool.git | ||
ARG REF=5.0.0 | ||
ARG TARGET_DIR=/opt/cachetool | ||
|
||
FROM composer:latest AS builder | ||
|
||
ARG REPOSITORY | ||
ARG REF | ||
ARG TARGET_DIR | ||
|
||
WORKDIR ${TARGET_DIR} | ||
|
||
RUN cd ${TARGET_DIR} \ | ||
&& git clone ${REPOSITORY} . \ | ||
&& git checkout ${REF} \ | ||
&& composer install --no-dev --optimize-autoloader | ||
|
||
|
||
FROM php:7.4-cli-buster | ||
|
||
MAINTAINER Sbit.io <soporte@sbit.io> | ||
|
||
ARG TARGET_DIR | ||
|
||
WORKDIR ${TARGET_DIR} | ||
|
||
ENV PATH=$PATH:$TARGET_DIR/bin | ||
|
||
COPY --from=builder ${TARGET_DIR} ${TARGET_DIR} | ||
|
||
#Not using entry ENTRYPOINT for backwards compatibility | ||
CMD [ "cachetool", "help" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
# docker-cachetool | ||
# docker-cachetool | ||
[![DockerHub Badge](http://dockeri.co/image/sbitio/cachetool)](https://hub.docker.com/r/sbitio/cachetool/) | ||
|
||
A simple docker helper for running [gordalina's cachetool](https://github.com/gordalina/cachetool) | ||
|
||
Invoking without command pints cachetool's help: | ||
```bash | ||
docker run --rm sbitio/cachetool | ||
``` | ||
|
||
## Using | ||
The most common use will be clearing caches. | ||
|
||
Example Using web adapter: | ||
```bash | ||
docker run --rm -v <your-local-webserber-path>:<your-local-webserber-path> -w <your-local-webserber-path> sbitio/cachetool cachetool -v --web --web-url=<your-reachable-url> <your-cachetool-cmd-with-args> | ||
``` | ||
Note: You can use docker's `--add-host` to leaverage nameserver resolution | ||
|
||
|
||
## Extending | ||
|
||
You can build containers using a fork: | ||
```bash | ||
docker build . --build-arg REPOSITORY=https://github.com/gordalina/cachetool REF=5.0.0 -t cachetool:<your-custom-tag> | ||
``` | ||
|
||
## Testing code changes | ||
Just mount the new code at `WORKDIR`: | ||
```bash | ||
docker run --rm -v <your-changed-code>:/opt/cachetool sbitio:cachetool <your-cachetool-cmg-with-args> | ||
``` |