Skip to content

Commit

Permalink
Added Dockerfile for running these commands through a container (#4)
Browse files Browse the repository at this point in the history
* Add Dockerfile

* Add instructions for Docker usage
  • Loading branch information
dudeitssm authored Mar 9, 2022
1 parent 488c102 commit 8780909
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:latest

RUN apk add --no-cache git gcc musl-dev && \
git clone https://github.com/bucanero/ps3iso-utils.git && \
find ps3iso-utils -type f -name "*.c" -exec \
sh -c 'OFILE=`basename "{}" ".c"` && gcc "{}" -o /usr/local/bin/"$OFILE"' \; && \
rm -rf ps3iso-utils && \
apk del git gcc musl-dev

WORKDIR /tmp
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Windows binaries](https://github.com/bucanero/ps3iso-utils/actions/workflows/build-win.yml/badge.svg)](https://github.com/bucanero/ps3iso-utils/actions/workflows/build-win.yml)
[![License](https://img.shields.io/github/license/bucanero/ps3iso-utils.svg)](./LICENSE)

Windows, Linux, and macOS builds of [Estwald's](https://github.com/Estwald) PS3 ISO utilities:
Windows, Linux, macOS, and [Docker](#docker) builds of [Estwald's](https://github.com/Estwald) PS3 ISO utilities:

- [extractps3iso](#extractps3iso)
- [makeps3iso](#makeps3iso)
Expand Down Expand Up @@ -57,3 +57,71 @@ Usage:
| :----- | :------ |
`splitps3iso` | interactive console input
`splitps3iso <ISO file>` | split ISO image (4Gb)

# Docker

It is possible to run these commands through a Docker or Podman container. The image size is less than 7MB.

1. Download the `Dockerfile`

2. Build the Docker image:

```
$ docker build -t ps3iso-utils .
```

3. Append the following functions to your `.bashrc`:

```
extractps3iso () {
docker run --rm -v "$PWD":/tmp localhost/ps3iso-utils extractps3iso "$@"
}
makeps3iso () {
docker run --rm -v "$PWD":/tmp localhost/ps3iso-utils makeps3iso "$@"
}
patchps3iso () {
docker run --rm -v "$PWD":/tmp localhost/ps3iso-utils patchps3iso "$@"
}
splitps3iso () {
docker run --rm -v "$PWD":/tmp localhost/ps3iso-utils splitps3iso "$@"
}
```

4. Source your `.bashrc` or close and reopen your terminal:

```
$ source ~/.bashrc
```

5. Run the program

Examples:

```
$ splitps3iso --help
SPLITPS3ISO (c) 2021, Bucanero
Usage:
splitps3iso -> input data from the program
splitps3iso <ISO file> -> split ISO image (4Gb)
```

```
$ makeps3iso BLUS12345
MAKEPS3ISO (c) 2013, Estwald (Hermes)
</>
-> PS3_DISC.SFB LBA 58 size 1 KB
</PS3_GAME>
-> ICON0.PNG LBA 59 size 46 KB
...
```

0 comments on commit 8780909

Please sign in to comment.