Skip to content

Commit 665508c

Browse files
committed
feat: add Docker support
1 parent 98cb231 commit 665508c

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Diff for: Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM php:8.1-cli-alpine
2+
3+
RUN $(php -r '$extensionInstalled = array_map("strtolower", \get_loaded_extensions(false));$requiredExtensions = ["zlib"];$extensionsToInstall = array_diff($requiredExtensions, $extensionInstalled);if ([] !== $extensionsToInstall) {echo \sprintf("docker-php-ext-install %s", implode(" ", $extensionsToInstall));}echo "echo \"No extensions\"";')
4+
5+
COPY builds/trakt-to-yts /trakt-to-yts
6+
7+
ENTRYPOINT ["/trakt-to-yts"]

Diff for: README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,23 @@ composer require pxgamer/trakt-to-yts
2323
- Set the `TRAKT_API_TOKEN` environment variable for your Terminal
2424
- Run `trakt-to-yts` to view available commands
2525

26+
### Via Docker
27+
28+
```shell
29+
# Build the Docker image
30+
docker build -t trakt-to-yts .
31+
32+
# Execute a command
33+
docker run --rm -it trakt-to-yts
34+
```
35+
2636
## Change log
2737

2838
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
2939

3040
## Testing
3141

32-
``` shell
42+
```shell
3343
composer test
3444
```
3545

0 commit comments

Comments
 (0)