-
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
0 parents
commit ae3882e
Showing
5 changed files
with
129 additions
and
0 deletions.
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,16 @@ | ||
FROM debian:bullseye-slim | ||
|
||
# Install PhotoRec and its dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
testdisk \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create a directory for mounting external volumes | ||
WORKDIR /data | ||
|
||
# Run PhotoRec as the entrypoint | ||
ENTRYPOINT ["photorec"] | ||
|
||
# Default command (can be overridden) | ||
CMD ["/data"] |
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,48 @@ | ||
name: Docker Build and Push | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
tags: [ 'v*.*.*' ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
REGISTRY: docker.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract metadata for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
Empty file.
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,9 @@ | ||
photorec-docker/ | ||
├── .github/ | ||
│ └── workflows/ | ||
│ └── docker-publish.yml | ||
├── docs/ | ||
│ └── usage.md | ||
├── Dockerfile | ||
├── README.md | ||
└── .dockerignore |
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,56 @@ | ||
# PhotoRec Docker Container | ||
|
||
A containerized version of PhotoRec data recovery tool, optimized for easy deployment and use in various environments including Unraid. | ||
|
||
## Features | ||
|
||
- Based on Debian Bullseye slim for minimal image size | ||
- Includes latest stable PhotoRec/TestDisk | ||
- Designed for easy mounting of devices and volumes | ||
- Compatible with Unraid and other Docker environments | ||
|
||
## Quick Start | ||
|
||
```bash | ||
# Pull the image | ||
docker pull yourusername/photorec | ||
|
||
# Run PhotoRec | ||
docker run -it --privileged \ | ||
--device=/dev/sdX \ | ||
-v /path/to/output:/data \ | ||
yourusername/photorec | ||
``` | ||
|
||
## Usage in Unraid | ||
|
||
1. Go to the Docker tab in Unraid web interface | ||
2. Click "Add Container" | ||
3. Fill in the template: | ||
- Repository: yourusername/photorec | ||
- Name: photorec | ||
- Network Type: Bridge | ||
- Volumes: | ||
- Host: /mnt/user/appdata/photorec | ||
- Container: /data | ||
- Extra Parameters: --privileged | ||
|
||
## Building Locally | ||
|
||
```bash | ||
git clone https://github.com/yourusername/photorec-docker.git | ||
cd photorec-docker | ||
docker build -t yourusername/photorec . | ||
``` | ||
|
||
## Security Note | ||
|
||
This container requires privileged access to read from devices. Only run it with devices you trust and in environments where you understand the security implications. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the LICENSE file for details. | ||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please feel free to submit a Pull Request. |