Skip to content

Commit

Permalink
dockerize redbrick sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pritamrungta committed Mar 14, 2024
1 parent 5776a73 commit f37abb2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,28 @@ jobs:
.venv/bin/activate
make build
twine upload dist/*
docker:
runs-on: ubuntu-latest
# needs:
# - deploy
# if: github.event_name == 'release' && needs.deploy.result == 'success'
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: redbrickai/redbrick-sdk:latest,redbrickai/redbrick-sdk:${{github.ref_type == 'tag' && github.ref_name || github.sha}}
env:
DOCKER_BUILDKIT: 1
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.12-slim

WORKDIR /usr/src/app

RUN python -m venv .venv
RUN pip install --upgrade pip redbrick-sdk

ENV VIRTUAL_ENV=/usr/src/app/.venv
ENV PATH="/usr/src/app/.venv/bin:$PATH"

CMD ["python"]

0 comments on commit f37abb2

Please sign in to comment.