Skip to content

Commit 1953cf6

Browse files
authored
build and publish containers to quay.io (#1485)
* Modernize Dockerfile Use non-MUSL based container image so we can benefit from manylinux1 wheels * build and publish containers to quay.io
2 parents 3cf62d8 + 74994e5 commit 1953cf6

File tree

4 files changed

+75
-14
lines changed

4 files changed

+75
-14
lines changed

.github/workflows/quay-publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: publish-quay
2+
on:
3+
push:
4+
branches:
5+
- main
6+
tags:
7+
- '*'
8+
workflow_dispatch: {}
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Get image tags
15+
id: image_tags
16+
run: |
17+
echo -n ::set-output name=IMAGE_TAGS::$(git describe --tags)
18+
- name: Build and publish cwltool_module image to Quay
19+
uses: docker/build-push-action@v1
20+
with:
21+
file: cwltool.Dockerfile
22+
registry: ${{ secrets.REGISTRY_SERVER }}
23+
repository: ${{ secrets.REGISTRY_NAMESPACE }}/cwltool_module
24+
username: ${{ secrets.REGISTRY_USERNAME }}
25+
password: ${{ secrets.REGISTRY_PASSWORD }}
26+
tags: "${{ steps.image_tags.outputs.IMAGE_TAGS }}"
27+
target: module
28+
- name: Build and publish cwltool image to Quay
29+
uses: docker/build-push-action@v1
30+
with:
31+
file: cwltool.Dockerfile
32+
registry: ${{ secrets.REGISTRY_SERVER }}
33+
repository: ${{ secrets.REGISTRY_NAMESPACE }}/cwltool
34+
username: ${{ secrets.REGISTRY_USERNAME }}
35+
password: ${{ secrets.REGISTRY_PASSWORD }}
36+
tags: "${{ steps.image_tags.outputs.IMAGE_TAGS }}"

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Conda: |Conda Version| |Conda Installs|
1010

1111
Debian: |Debian Testing package| |Debian Stable package|
1212

13+
Quay.io (Docker): |Quay.io Container|
14+
1315
.. |Linux Status| image:: https://github.com/common-workflow-language/cwltool/actions/workflows/ci-tests.yml/badge.svg?branch=main
1416
:target: https://github.com/common-workflow-language/cwltool/actions/workflows/ci-tests.yml
1517

@@ -37,6 +39,9 @@ Debian: |Debian Testing package| |Debian Stable package|
3739
.. |Conda Installs| image:: https://anaconda.org/conda-forge/cwltool/badges/downloads.svg
3840
:target: https://anaconda.org/conda-forge/cwltool
3941

42+
.. |Quay.io Container| image:: https://quay.io/repository/commonwl/cwltool/status
43+
:target https://quay.io/repository/commonwl/cwltool
44+
4045
This is the reference implementation of the Common Workflow Language. It is
4146
intended to be feature complete and provide comprehensive validation of CWL
4247
files as well as provide other tools related to working with CWL.

build-cwl-docker.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
2-
set -e
3-
docker build --file=cwltool.Dockerfile --tag=commonworkflowlanguage/cwltool_module --target module .
4-
docker build --file=cwltool.Dockerfile --tag=commonworkflowlanguage/cwltool .
2+
set -ex
3+
docker build --file=cwltool.Dockerfile --tag=quay.io/commonwl/cwltool_module --target module .
4+
docker build --file=cwltool.Dockerfile --tag=quay.io/commonwl/cwltool .
55

66
version=$(git describe --tags)
77
if echo "$version" | grep -vq '\-' >& /dev/null ; then
8-
docker tag commonworkflowlanguage/cwltool_module commonworkflowlanguage/cwltool_module:"$version"
9-
docker tag commonworkflowlanguage/cwltool commonworkflowlanguage/cwltool:"$version"
8+
docker tag quay.io/commonwl/cwltool_module quay.io/commonwl/cwltool_module:"$version"
9+
docker tag quay.io/commonwl/cwltool quay.io/commonwl/cwltool:"$version"
1010
fi

cwltool.Dockerfile

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
FROM python:3.8-alpine as builder
2-
3-
RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linux-headers
1+
FROM python:3.9-slim as builder
2+
3+
RUN apt-get update && apt-get install -y \
4+
gcc \
5+
git \
6+
libc-dev \
7+
libxml2-dev \
8+
libxslt1-dev \
9+
python3-dev \
10+
&& rm -rf /var/lib/apt/lists/*
11+
# linux-headers \
412

513
WORKDIR /cwltool
614
COPY . .
@@ -9,16 +17,28 @@ RUN python setup.py bdist_wheel --dist-dir=/wheels
917
RUN pip wheel -r requirements.txt --wheel-dir=/wheels
1018
RUN pip install --no-index --no-warn-script-location --root=/pythonroot/ /wheels/*.whl
1119

12-
FROM python:3.8-alpine as module
13-
LABEL maintainer peter.amstutz@curoverse.com
20+
FROM python:3.9-slim as module
21+
LABEL maintainer peter.amstutz@curii.com
1422

15-
RUN apk add --no-cache docker nodejs graphviz libxml2 libxslt
23+
RUN apt-get update && apt-get install -y \
24+
docker.io \
25+
graphviz \
26+
libxml2 \
27+
libxslt1.1 \
28+
nodejs \
29+
&& rm -rf /var/lib/apt/lists/*
1630
COPY --from=builder /pythonroot/ /
1731

18-
FROM python:3.8-alpine
19-
LABEL maintainer peter.amstutz@curoverse.com
32+
FROM python:3.9-slim
33+
LABEL maintainer peter.amstutz@curii.com
2034

21-
RUN apk add --no-cache docker nodejs graphviz libxml2 libxslt
35+
RUN apt-get update && apt-get install -y \
36+
docker.io \
37+
graphviz \
38+
libxml2 \
39+
libxslt1.1 \
40+
nodejs \
41+
&& rm -rf /var/lib/apt/lists/*
2242
COPY --from=builder /pythonroot/ /
2343
COPY cwltool-in-docker.sh /cwltool-in-docker.sh
2444

0 commit comments

Comments
 (0)