Skip to content

Commit 2ee80c7

Browse files
nigelgbanksNigel Banks
andauthored
Issue 168 vulnerability checks (#183)
* Update plugin to latest to get vunerability analysis checks * Bumped alpine version to latest stable. * Updated Imagemagick to latest * Fix for java-jna package discontinued for aarch64 * Added link to aports issue that requires custom build of java-jna * Generate grype reports on pushs as well as pull requests. * Updated fits to latest to get security updates. * Added ability to ignore specific vulnerabilities, while a fix is not availiable. * Updated tomcat to latest * Documented additional flag for grype * Made alpine version a argument. Co-authored-by: Nigel Banks <[email protected]:w>
1 parent 51a6b09 commit 2ee80c7

File tree

30 files changed

+456
-58
lines changed

30 files changed

+456
-58
lines changed

.github/workflows/pr.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ jobs:
2525
- name: Build/Test Docker images
2626
uses: eskatos/gradle-command-action@v1
2727
with:
28-
arguments: build test -PisCI=true --info
28+
arguments: build test grype -PisCI=true --info
29+
- uses: actions/upload-artifact@v2
30+
with:
31+
name: Grype Reports
32+
path: build/**/*-grype.*

.github/workflows/push.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ jobs:
3131
- name: Build/Test/Push Docker images
3232
uses: eskatos/gradle-command-action@v1
3333
with:
34-
arguments: build test '-Pdocker.tags=${{ env.TAG }}' '-Pdocker.repository=${{ secrets.REPOSITORY }}' -Pdocker.push=true -Pdocker.driver=docker-container -Pdocker.cacheTo=true -Pdocker.platforms=linux/amd64,linux/arm64 -PisCI=true --info
34+
arguments: build test grype '-Pdocker.tags=${{ env.TAG }}' '-Pdocker.repository=${{ secrets.REPOSITORY }}' -Pdocker.push=true -Pdocker.driver=docker-container -Pdocker.cacheTo=true -Pdocker.platforms=linux/amd64,linux/arm64 -PisCI=true --info
35+
- uses: actions/upload-artifact@v2
36+
with:
37+
name: Grype Reports
38+
path: build/**/*-grype.*

abuild/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# syntax=docker/dockerfile:1.2.1
22
ARG repository=local
33
ARG tag=latest
4+
ARG alpine=3.15.0
45
FROM ${repository}/download:${tag} AS download
5-
FROM alpine:3.13.2 AS cache
6-
FROM alpine:3.13.2
6+
FROM alpine:${alpine} AS cache
7+
FROM alpine:${alpine}
78

89
RUN --mount=type=cache,id=abuild-apk,sharing=locked,from=cache,target=/var/cache/apk \
910
ln -s /var/cache/apk /etc/apk/cache && \

base/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# syntax=docker/dockerfile:1.2.1
22
ARG repository=local
33
ARG tag=latest
4+
ARG alpine=3.15.0
45
FROM ${repository}/download:${tag} AS download
5-
FROM alpine:3.13.2 AS cache
6-
FROM alpine:3.13.2
6+
FROM alpine:${alpine} AS cache
7+
FROM alpine:${alpine}
78

89
ENV DOWNLOAD_CACHE_DIRECTORY=/opt/downloads
910

base/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ It's based off off [Alpine Linux], and includes [s6 overlay] and [confd].
77

88
## Dependencies
99

10-
Requires `alpine:3.13.2`
10+
Requires `alpine`
1111

1212
## Settings
1313

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
plugins {
2-
id("com.github.nigelgbanks.IsleDocker") version "0.7"
2+
id("com.github.nigelgbanks.IsleDocker") version "0.9"
33
}

cantaloupe/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1.2.1
22
ARG repository=local
33
ARG tag=latest
4+
ARG alpine=3.15.0
45
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download
56

67
RUN --mount=type=cache,id=cantaloupe-downloads,sharing=locked,target=/opt/downloads \
@@ -14,7 +15,7 @@ RUN --mount=type=cache,id=cantaloupe-downloads,sharing=locked,target=/opt/downlo
1415
install-war-into-tomcat.sh --name "cantaloupe" --file "/tmp/${CANTALOUPE_UNPACKED}/${CANTALOUPE_UNPACKED}.war" && \
1516
rm -fr "/tmp/${CANTALOUPE_UNPACKED}"
1617

17-
FROM alpine:3.13.2 AS cache
18+
FROM alpine:${alpine} AS cache
1819
FROM ${repository}/tomcat:${tag}
1920

2021
COPY --from=download --chown=tomcat:tomcat /opt/tomcat /opt/tomcat

code-server/Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# syntax=docker/dockerfile:1.2.1
22
ARG repository=local
33
ARG tag=latest
4-
FROM alpine:3.13.2 AS cache
4+
ARG alpine=3.15.0
5+
FROM alpine:${alpine} AS cache
6+
FROM node:fermium-alpine3.15 as node
57
FROM ${repository}/abuild:${tag} AS build
68

9+
COPY --from=node /usr/lib /usr/lib
10+
COPY --from=node /usr/local/share /usr/local/share
11+
COPY --from=node /usr/local/lib /usr/local/lib
12+
COPY --from=node /usr/local/include /usr/local/include
13+
COPY --from=node /usr/local/bin /usr/local/bin
14+
COPY --from=node /opt /opt
15+
716
# g++, make, python are only required to build native dependencies via node-gyp.
817
# spdlog is required for building / using xdebug extension.
918
RUN --mount=type=cache,id=code-server-apk,sharing=locked,from=cache,target=/var/cache/apk \
@@ -14,8 +23,7 @@ RUN --mount=type=cache,id=code-server-apk,sharing=locked,from=cache,target=/var/
1423
nghttp2-dev \
1524
python3 \
1625
spdlog \
17-
sudo \
18-
yarn
26+
sudo
1927

2028
# `node-gyp` must be installed before anything else. This is unfortuante, but
2129
# make sure the version here matches the exact version in:
@@ -83,7 +91,6 @@ RUN --mount=type=cache,id=code-server-drupal-apk,sharing=locked,from=cache,targe
8391
htop \
8492
php7-pecl-xdebug \
8593
spdlog \
86-
yarn \
8794
sudo \
8895
unison \
8996
parallel \
@@ -104,6 +111,12 @@ ENV \
104111
COPY --from=composer --chown=nginx:nginx /root/.composer /var/lib/nginx/.composer
105112
COPY --from=build --chown=nginx:nginx /opt/code-server /opt/code-server
106113
COPY --from=build /usr/local/share/.config/yarn /usr/local/share/.config/yarn
114+
COPY --from=node /usr/lib /usr/lib
115+
COPY --from=node /usr/local/share /usr/local/share
116+
COPY --from=node /usr/local/lib /usr/local/lib
117+
COPY --from=node /usr/local/include /usr/local/include
118+
COPY --from=node /usr/local/bin /usr/local/bin
119+
COPY --from=node /opt /opt
107120

108121
COPY rootfs /
109122

composer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1.2.1
22
ARG repository=local
33
ARG tag=latest
4+
ARG alpine=3.15.0
45
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download
56

67
# https://getcomposer.org/download/
@@ -13,7 +14,7 @@ RUN --mount=type=cache,id=download-downloads,sharing=locked,target=/opt/download
1314
cp "${DOWNLOAD_CACHE_DIRECTORY}/${COMPOSER_FILE}" /usr/bin/composer && \
1415
chmod a+x /usr/bin/composer
1516

16-
FROM alpine:3.13.2 AS cache
17+
FROM alpine:${alpine} AS cache
1718
FROM ${repository}/download:${tag}
1819

1920
# Install packages and tools that allow for basic downloads.

download/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1.2.1
2-
FROM alpine:3.13.2 AS cache
3-
FROM alpine:3.13.2
2+
ARG alpine=3.15.0
3+
FROM alpine:${alpine} AS cache
4+
FROM alpine:${alpine}
45

56
# Install packages and tools that allow for basic downloads.
67
RUN --mount=type=cache,id=download-apk,sharing=locked,from=cache,target=/var/cache/apk \

0 commit comments

Comments
 (0)