Skip to content

Commit

Permalink
Add a dockerfile + a build GHA
Browse files Browse the repository at this point in the history
- Use repo2docker-action (https://github.com/jupyterhub/repo2docker-action)
  for familiar (to 2i2c) tagging behavior
- Use python images as base, rather than micromamba because I
  could not get the micromamba image to work

Ref 2i2c-org/frx-challenges#107
  • Loading branch information
yuvipanda committed Oct 19, 2024
1 parent 5ea235a commit 555938b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build

on:
push:
branches: main
pull_request:

jobs:
login:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Checkout repo
uses: actions/checkout@v2
with:
# Get everything so chartpress knows how to properly tag this
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.11'
# We only install dev-requirements here, as actual requirements
# are built from inside a docker environment
cache-dependency-path: dev-requirements.txt
cache: 'pip'

- name: Build image with Dockerfile & repo2docker
uses: jupyterhub/repo2docker-action@master
with:
NO_PUSH: true
IMAGE_NAME: test
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.11

COPY . /opt/repo

RUN pip install --no-cache /opt/repo

0 comments on commit 555938b

Please sign in to comment.