Skip to content

Commit

Permalink
added docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoeker12 committed Nov 15, 2024
1 parent db5cbb7 commit bf6c58a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Manual | Build and Push Docker Image - docker/python
run-name: "Build New Python Docker Image"

on:
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/python
push: true
tags: |
ghcr.io/${{ github.repository }}/python:latest
ghcr.io/${{ github.repository }}/python:${{ github.sha }}
11 changes: 11 additions & 0 deletions docker/python
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.13-slim

WORKDIR /app
COPY requirements.txt .

# install dependencies
# --no-cache-dir flag reduces the image size
RUN pip install --no-cache-dir -r requirements.txt

# unbuffered mode better for output
ENV PYTHONUNBUFFERED=1
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
git+https://github.com/deploymenttheory/jamftf-python-terraform-importer@main
git+https://github.com/thejoeker12/jamfpy@main

0 comments on commit bf6c58a

Please sign in to comment.