Skip to content

Commit

Permalink
feat: add dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeshi committed Oct 30, 2022
1 parent e731d39 commit 138ab9a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.9.15-bullseye

RUN apt -y update && apt upgrade -qqy && apt -y install \
curl \
gcc \
git

RUN pip install -U pip && pip install poetry
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "dev",
"dockerFile": "Dockerfile",
"postCreateCommand": "/bin/sh ./.devcontainer/postCreateCommands.sh",
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance"
],
"settings": {
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
}
}
6 changes: 6 additions & 0 deletions .devcontainer/postCreateCommands.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

poetry config virtualenvs.in-project true
poetry install

echo 'Welcome to the ntfsdump development environment!'
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-buster
FROM python:3.9-bullseye

# install from pypi
WORKDIR /app
Expand Down
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: "3.8"

# It can also be run from docker-compose by specifying the following options.
# Note that only the current directory can be specified as a target.
#
# $ ARGUMENTS="'/$MFT' ./path/to/imagefile" docker-compose up

services:
app:
container_name: ntfsdump
build:
context: ./
dockerfile: Dockerfile
volumes:
- .:/app
environment:
- ARGUMENTS="-h"
command: ${ARGUMENTS}

0 comments on commit 138ab9a

Please sign in to comment.