-
Notifications
You must be signed in to change notification settings - Fork 1
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
6 changed files
with
338 additions
and
327 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,39 @@ | ||
name: build-docker-image | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
build: | ||
name: Build docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: get version tag | ||
id: tag_number | ||
run: | | ||
CURRENT_TAG=$(git tag --sort=-creatordate | sed -n 1p) | ||
DOCKERHUB_TAG="${CURRENT_TAG//v/}" | ||
echo "::set-output name=dh_tag::${DOCKERHUB_TAG}" | ||
- name: setup docker buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: login to dockerhub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: build and push to dockerhub | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
sumeshi/ntfsfind:latest | ||
sumeshi/ntfsfind:${{steps.tag_number.outputs.dh_tag}} |
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,18 +1,10 @@ | ||
FROM python:3.7-buster | ||
FROM python:3.9-buster | ||
|
||
# configure poetry | ||
RUN pip install poetry | ||
RUN poetry config virtualenvs.create false | ||
|
||
# install dependencies | ||
# install from pypi | ||
WORKDIR /app | ||
COPY . /app | ||
RUN poetry install | ||
|
||
# delete caches | ||
RUN rm -rf ~/.cache/pip | ||
RUN pip install ntfsfind | ||
|
||
# you can rewrite this command when running the docker container. | ||
# ex. docker run -t --rm -v $(pwd):/app/work ntfsfind:latest '/\$MFT' /app/work/sample.raw | ||
# ex. docker run --rm -v $(pwd):/app -t ntfsdump:latest '/$MFT' /app/sample.raw | ||
ENTRYPOINT ["ntfsfind"] | ||
CMD ["-h"] |
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
Oops, something went wrong.