diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml new file mode 100644 index 000000000..81c31c7ad --- /dev/null +++ b/.github/workflows/deploy-image.yml @@ -0,0 +1,41 @@ +name: Create and publish a Docker image + +on: + push: + branches: ['master'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..49cfa01ab --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM continuumio/miniconda3 + +LABEL Description="ShapePipe Docker Image" +WORKDIR /home +ENV SHELL /bin/bash + +ARG CC=gcc-9 +ARG CXX=g++-9 + +RUN apt-get update --allow-releaseinfo-change && \ + apt-get update && \ + apt-get upgrade -y && \ + apt-get install make -y && \ + apt-get install gcc-9 g++-9 -y && \ + apt-get install locales -y && \ + apt install libgl1-mesa-glx -y && \ + apt-get clean + +RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +COPY . /home + +RUN ./install_shapepipe --develop --vos