Skip to content

Commit

Permalink
added docker-build to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeneghini committed Jan 20, 2024
1 parent 4590486 commit cba5fb9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Build

on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: jmeneghini/midsx_ubuntu:latest
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ RUN python3.10 -m pip install \
numpy \
nibabel

# Clone the MIDSX repository, and all submodules
RUN git clone --recurse-submodules https://github.com/jmeneghini/MIDSX.git /usr/src/MIDSX
# Make a directory for MIDSX
RUN mkdir /usr/src/MIDSX

# Set the working directory
WORKDIR /usr/src/MIDSX

# Copy the source code into the container
COPY . .

# Build and install MIDSX
RUN mkdir build && cd build && cmake .. && make install

Expand Down

0 comments on commit cba5fb9

Please sign in to comment.