Skip to content

Commit bbb1a81

Browse files
authored
Merge pull request #1 from aphp/dev
Init with documentation and source images
2 parents e56f71d + da7e3b8 commit bbb1a81

File tree

14 files changed

+606
-1
lines changed

14 files changed

+606
-1
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- "dev"
7+
tags:
8+
- "v*.*.*"
9+
10+
jobs:
11+
lint-redcap-fastcgi-client:
12+
name: lint-redcap-fastcgi-client
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
- name: Lint Dockerfile with Hadolint
18+
uses: hadolint/hadolint-action@v3.1.0
19+
with:
20+
dockerfile: ./fastcgi-client/Dockerfile
21+
override-info: DL3008,DL3018,DL3041,SC2046
22+
failure-threshold: warning
23+
24+
scan-redcap-fastcgi-client:
25+
name: scan-redcap-fastcgi-client
26+
needs: lint-redcap-fastcgi-client
27+
runs-on: ubuntu-20.04
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
- name: Build container from Dockerfile
32+
run: docker build -t ghcr.io/aphp/redcap-fastcgi-client:${{ github.sha }} ./fastcgi-client
33+
- name: Run Dockle
34+
uses: erzz/dockle-action@v1.4.0
35+
with:
36+
image: ghcr.io/aphp/redcap-fastcgi-client:${{ github.sha }}
37+
report-format: json
38+
failure-threshold: fatal
39+
exit-code: 1
40+
- name: Scan container for vulnerabilities with Trivy
41+
uses: aquasecurity/trivy-action@0.28.0
42+
with:
43+
image-ref: 'ghcr.io/aphp/redcap-fastcgi-client:${{ github.sha }}'
44+
format: 'table'
45+
exit-code: '1'
46+
ignore-unfixed: true
47+
scanners: 'vuln,secret,license'
48+
vuln-type: 'os,library'
49+
severity: 'CRITICAL'
50+
51+
push-redcap-fastcgi-client:
52+
name: push-redcap-fastcgi-client
53+
needs: scan-redcap-fastcgi-client
54+
runs-on: ubuntu-24.04
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
59+
- name: Docker meta
60+
id: meta
61+
uses: docker/metadata-action@v5
62+
with:
63+
# list of Docker images to use as base name for tags
64+
images: |
65+
ghcr.io/aphp/redcap-fastcgi-client
66+
# generate Docker tags based on the following events/attributes
67+
tags: |
68+
type=schedule
69+
type=ref,event=branch
70+
type=ref,event=pr
71+
type=semver,pattern={{version}}
72+
type=semver,pattern={{major}}.{{minor}}
73+
type=semver,pattern={{major}}
74+
type=sha
75+
76+
- name: Set up QEMU
77+
uses: docker/setup-qemu-action@v3
78+
79+
- name: Set up Docker Buildx
80+
uses: docker/setup-buildx-action@v3
81+
82+
- name: 'Login to GitHub Container Registry'
83+
uses: docker/login-action@v3.3.0
84+
with:
85+
registry: ghcr.io
86+
username: ${{github.actor}}
87+
password: ${{secrets.GITHUB_TOKEN}}
88+
89+
- name: Build and push
90+
uses: docker/build-push-action@v6
91+
with:
92+
context: "{{defaultContext}}:fastcgi-client"
93+
push: ${{ github.event_name != 'pull_request' }}
94+
tags: ${{ steps.meta.outputs.tags }}
95+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- dev
7+
pull_request:
8+
9+
jobs:
10+
lint-redcap-httpd-shibd:
11+
name: lint-redcap-httpd-shibd
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Lint Dockerfile with Hadolint
17+
uses: hadolint/hadolint-action@v3.1.0
18+
with:
19+
dockerfile: ./httpd-shibd/Dockerfile
20+
override-info: DL3008,DL3018,DL3041,SC2046
21+
failure-threshold: warning
22+
23+
scan-redcap-httpd-shibd:
24+
name: scan-redcap-httpd-shibd
25+
needs: lint-redcap-httpd-shibd
26+
runs-on: ubuntu-20.04
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
- name: Build container from Dockerfile
31+
run: docker build -t ghcr.io/aphp/redcap-httpd-shibd:${{ github.sha }} ./httpd-shibd
32+
- name: Run Dockle
33+
uses: erzz/dockle-action@v1.4.0
34+
with:
35+
image: ghcr.io/aphp/redcap-httpd-shibd:${{ github.sha }}
36+
report-format: json
37+
failure-threshold: fatal
38+
exit-code: 1
39+
- name: Scan container for vulnerabilities with Trivy
40+
uses: aquasecurity/trivy-action@0.28.0
41+
with:
42+
image-ref: 'ghcr.io/aphp/redcap-httpd-shibd:${{ github.sha }}'
43+
format: 'table'
44+
exit-code: '1'
45+
ignore-unfixed: true
46+
scanners: 'vuln,secret,license'
47+
vuln-type: 'os,library'
48+
severity: 'CRITICAL'
49+
50+
push-redcap-httpd-shibd:
51+
name: push-redcap-httpd-shibd
52+
needs: scan-redcap-httpd-shibd
53+
runs-on: ubuntu-24.04
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Docker meta
59+
id: meta
60+
uses: docker/metadata-action@v5
61+
with:
62+
# list of Docker images to use as base name for tags
63+
images: |
64+
ghcr.io/aphp/redcap-httpd-shibd
65+
# generate Docker tags based on the following events/attributes
66+
tags: |
67+
type=schedule
68+
type=ref,event=branch
69+
type=ref,event=pr
70+
type=semver,pattern={{version}}
71+
type=semver,pattern={{major}}.{{minor}}
72+
type=semver,pattern={{major}}
73+
type=sha
74+
75+
- name: Set up QEMU
76+
uses: docker/setup-qemu-action@v3
77+
78+
- name: Set up Docker Buildx
79+
uses: docker/setup-buildx-action@v3
80+
81+
- name: 'Login to GitHub Container Registry'
82+
uses: docker/login-action@v3.3.0
83+
with:
84+
registry: ghcr.io
85+
username: ${{github.actor}}
86+
password: ${{secrets.GITHUB_TOKEN}}
87+
88+
- name: Build and push
89+
uses: docker/build-push-action@v6
90+
with:
91+
context: "{{defaultContext}}:httpd-shibd"
92+
push: ${{ github.event_name != 'pull_request' }}
93+
tags: ${{ steps.meta.outputs.tags }}
94+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- dev
7+
pull_request:
8+
9+
jobs:
10+
lint-redcap-php-fpm:
11+
name: lint-redcap-php-fpm
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
- name: Lint Dockerfile with Hadolint
17+
uses: hadolint/hadolint-action@v3.1.0
18+
with:
19+
dockerfile: ./php-fpm/Dockerfile
20+
override-info: DL3008,DL3018,DL3041,SC2046
21+
failure-threshold: warning
22+
23+
scan-redcap-php-fpm:
24+
name: scan-redcap-php-fpm
25+
needs: lint-redcap-php-fpm
26+
runs-on: ubuntu-20.04
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
- name: Build container from Dockerfile
31+
run: docker build -t ghcr.io/aphp/redcap-php-fpm:${{ github.sha }} ./php-fpm
32+
- name: Run Dockle
33+
uses: erzz/dockle-action@v1.4.0
34+
with:
35+
image: ghcr.io/aphp/redcap-php-fpm:${{ github.sha }}
36+
report-format: json
37+
failure-threshold: fatal
38+
exit-code: 1
39+
- name: Scan container for vulnerabilities with Trivy
40+
uses: aquasecurity/trivy-action@0.28.0
41+
with:
42+
image-ref: 'ghcr.io/aphp/redcap-php-fpm:${{ github.sha }}'
43+
format: 'table'
44+
exit-code: '1'
45+
ignore-unfixed: true
46+
scanners: 'vuln,secret,license'
47+
vuln-type: 'os,library'
48+
severity: 'CRITICAL'
49+
50+
push-redcap-php-fpm:
51+
name: push-redcap-php-fpm
52+
needs: scan-redcap-php-fpm
53+
runs-on: ubuntu-24.04
54+
steps:
55+
- name: Checkout code
56+
uses: actions/checkout@v4
57+
58+
- name: Docker meta
59+
id: meta
60+
uses: docker/metadata-action@v5
61+
with:
62+
# list of Docker images to use as base name for tags
63+
images: |
64+
ghcr.io/aphp/redcap-php-fpm
65+
# generate Docker tags based on the following events/attributes
66+
tags: |
67+
type=schedule
68+
type=ref,event=branch
69+
type=ref,event=pr
70+
type=semver,pattern={{version}}
71+
type=semver,pattern={{major}}.{{minor}}
72+
type=semver,pattern={{major}}
73+
type=sha
74+
75+
- name: Set up QEMU
76+
uses: docker/setup-qemu-action@v3
77+
78+
- name: Set up Docker Buildx
79+
uses: docker/setup-buildx-action@v3
80+
81+
- name: 'Login to GitHub Container Registry'
82+
uses: docker/login-action@v3.3.0
83+
with:
84+
registry: ghcr.io
85+
username: ${{github.actor}}
86+
password: ${{secrets.GITHUB_TOKEN}}
87+
88+
- name: Build and push
89+
uses: docker/build-push-action@v6
90+
with:
91+
context: "{{defaultContext}}:php-fpm"
92+
push: ${{ github.event_name != 'pull_request' }}
93+
tags: ${{ steps.meta.outputs.tags }}
94+
labels: ${{ steps.meta.outputs.labels }}

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
## How to contribute to the `aphp/redcap-containers` project
3+
4+
#### **Did you find a bug?**
5+
6+
* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/aphp/redcap-containers/issues).
7+
8+
* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/aphp/redcap-containers/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
9+
10+
#### **Did you write a patch that fixes a bug?**
11+
12+
* Open a new GitHub pull request with the patch.
13+
14+
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
15+
16+
#### **Do you intend to add a new feature or change an existing one?**
17+
18+
* Suggest your change in a dedicated issue.
19+
20+
* Do not submit a PR on GitHub until you have collected positive feedback about the change.
21+

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,5 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202+
203+
[2023 - 2024] [REDCap Helm Chart] © Assistance Publique – Hôpitaux de Paris.

NOTICE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
This software contains the following dependencies developped by Broadcom :
2+
3+
- Docker Images
4+
- alpinelinux : https://github.com/alpinelinux/docker-alpine
5+
- rockylinux : https://github.com/rocky-linux/sig-cloud-instance-images
6+
- docker/php: https://github.com/docker-library/php
7+
8+
Those dependecies are present as source f the images presents in this repository.
9+
Indidual licence statements are presents in the following links :
10+
- alpinelinux : https://github.com/alpinelinux/docker-alpine/blob/master/LICENSE
11+
- rockylinux : https://rockylinux.org/fr-FR/legal/licensing
12+
- docker/php: https://github.com/docker-library/php/blob/master/LICENSE
13+
14+
The build process of the images present in this repository includes a licence check - reports can be found in the Github Actions.

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
# redcap-containers
1+
# APHP - REDCap Helm Chart containers
2+
3+
## Presentation
4+
5+
This repository is hosting the container images that are needed to run the REDCap Helm Chart provided by the Greater Paris University Hospitals.
6+
7+
Those images are as follow :
8+
- `httpd-shibd` : A custom container made to host an instance of Apache HTTPd and Shibboleth.
9+
- [see the `httpd-shibd` folder](./httpd-shibd/)
10+
- `fastcgi-client` : A simple FastCGI client.
11+
- [see the `fastcgi-client` folder](./fastcgi-client/)
12+
- `php-fpm` : A PHP 8.2 FPM server that contains all dependencies and configurations needed by REDCap.
13+
- [see the `php-fpm` folder](./php-fpm/)
14+
15+
Each subfolder contains its own README file.
16+
17+
All those containers are `rootless`, and **none of them is containing, or distributing REDCap binairies**.
18+
If you wish to use REDCap and are not sure where to start, you may visit the dedicated [REDCap Community Site](https://projectredcap.org/resources/community/).
19+
20+
## Continous Integration / Continous Delivery
21+
22+
This project uses 3 Github Workflows (presents under the .github/workflows directory), which will, for each image :
23+
- Lint the Dockerfile using `Hadolint`
24+
- Scan the container images using `Dockle`
25+
- Runs critical vulnerability, secrets and license checks on the container image using `Trivy`
26+
- Pushes the container images to this project's GHCR for it to be retrieved as a container image.
27+
28+
## How can I contribute?
29+
30+
You're welcome to read the [contribution guidelines](./CONTRIBUTING.md).
31+
32+
## How is this project licensed?
33+
34+
The informations about the licensing and the dependencies of this project can be found under :
35+
- The [project's license file](./LICENSE)
36+
- The [legal notice](./NOTICE)

fastcgi-client/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM alpine:3
2+
3+
LABEL maintainer=APHP
4+
5+
RUN apk update &&\
6+
apk add --no-cache fcgi
7+
8+
RUN adduser -S cgi
9+
10+
USER cgi
11+
12+
ENTRYPOINT ["cgi-fcgi"]

0 commit comments

Comments
 (0)