Skip to content

Commit

Permalink
feat: add kubectl & utils to ompp image (#122)
Browse files Browse the repository at this point in the history
copied from jupyterlab-cpu image
  • Loading branch information
vexingly authored Aug 15, 2024
1 parent c6a1cb9 commit db80bc5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
build:
env:
TRIVY_VERSION: "v0.43.1"
HADOLINT_VERSION: "2.12.0"
needs: listimages
strategy:
fail-fast: false
Expand All @@ -51,12 +52,9 @@ jobs:
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin ${{ env.TRIVY_VERSION }}
trivy image localhost:5000/${{ matrix.image }}:${{ github.sha }} --exit-code 1 --timeout=20m --security-checks vuln --severity CRITICAL
# Run Dockle
- name: Run dockle
uses: goodwithtech/dockle-action@main
with:
image: localhost:5000/${{ matrix.image }}:${{ github.sha }}
format: 'list'
exit-code: '0'
exit-level: 'fatal'
ignore: 'DKL-DI-0006'
# Run Hadolint
- name: Run Hadolint
run: |
sudo curl -L https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 --output hadolint
sudo chmod +x hadolint
./hadolint ${{ matrix.image }}/Dockerfile --no-fail
18 changes: 8 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
build:
env:
TRIVY_VERSION: "v0.43.1"
HADOLINT_VERSION: "2.12.0"
needs: listimages
strategy:
fail-fast: false
Expand Down Expand Up @@ -64,16 +65,13 @@ jobs:
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin ${{ env.TRIVY_VERSION }}
trivy image localhost:5000/${{ matrix.image }}:${{ github.sha }} --exit-code 1 --timeout=20m --security-checks vuln --severity CRITICAL
# Run Dockle
- name: Run dockle
uses: goodwithtech/dockle-action@main
with:
image: localhost:5000/${{ matrix.image }}:${{ github.sha }}
format: 'list'
exit-code: '0'
exit-level: 'fatal'
ignore: 'DKL-DI-0006'
# Run Hadolint
- name: Run Hadolint
run: |
sudo curl -L https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 --output hadolint
sudo chmod +x hadolint
./hadolint ${{ matrix.image }}/Dockerfile --no-fail
# Container build and push to a Azure Container registry (ACR)
- run: |
Expand Down
14 changes: 14 additions & 0 deletions ompp-run-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,26 @@ RUN echo "ulimit -S -s 65536" >> etc/bash.bashrc && \
apt-get update && \
apt-get install -y \
apt-utils \
curl \
jq \
htop \
tree \
zip \
sqlite3 \
openmpi-bin \
unixodbc && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*

ARG KUBECTL_VERSION=v1.28.2
ARG KUBECTL_URL=https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl
ARG KUBECTL_SHA=c922440b043e5de1afa3c1382f8c663a25f055978cbc6e8423493ec157579ec5

RUN curl -LO "${KUBECTL_URL}" \
&& echo "${KUBECTL_SHA} kubectl" | sha256sum -c - \
&& chmod +x ./kubectl \
&& mv ./kubectl /usr/local/bin/kubectl

# set local openM++ timezone
RUN rm -f /etc/localtime && \
ln -s /usr/share/zoneinfo/America/Toronto /etc/localtime
Expand Down

0 comments on commit db80bc5

Please sign in to comment.