Skip to content

Commit

Permalink
Added Docker File (#134)
Browse files Browse the repository at this point in the history
* Added Docker File

* Added Docker File

* added build.yml

* consistent

* added github tokens

* updated build.yml

* updated build.yml

* updated build.yml

* updated build.yml

* updated pre-config.yaml

* updated unit_test.yml

* updated unit_test.yml

* reverted unit_test.yml and .pre-commit-config.yaml

* updated build.yml - Single docker build
  • Loading branch information
Abhinavexists authored Oct 30, 2024
1 parent da2670e commit be56188
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build_docker.yml

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
app-version: ['v0.1.1'] # Add more app versions as needed
steps:
- uses: actions/checkout@v3

- name: Set up Docker
uses: docker/setup-buildx-action@v2

- name: Build Docker image for each combination of Python and App versions
run: |
docker build --build-arg PYTHON_VERSION=${{ matrix.python-version }} \
--build-arg APP_VERSION=${{ matrix.app-version }} \
-t piqture:${{ matrix.app-version }}-${{ matrix.python-version }} .
- name: Run Docker container
run: |
docker run piqture:${{ matrix.app-version }}-${{ matrix.python-version }}
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: ^(docs|graphics|utils)/

- id: end-of-file-fixer
Expand Down Expand Up @@ -40,5 +41,5 @@ repos:
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.9.0
# hooks:
# - id: mypy
# - id: mypyn
# exclude: docs
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG PYTHON_VERSION=3.9
FROM python:${PYTHON_VERSION}-slim-bullseye

WORKDIR /app

COPY requirements.txt /app/requirements.txt

RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . /app
CMD ["python", "setup.py", "--help-commands"]

0 comments on commit be56188

Please sign in to comment.