dhfdh
This commit is contained in:
parent
355d1e66dd
commit
8af66605ae
12
.github/workflows/dockerfile.yml
vendored
12
.github/workflows/dockerfile.yml
vendored
@ -12,13 +12,19 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: docker://hadolint/hadolint:latest
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# - name: Installing dependencies..
|
# - name: Installing dependencies..
|
||||||
# run: if ! apt list --installed | grep -qP "^hadolint -"; then apt install -y hadolint; fi
|
# run: |
|
||||||
|
# # Fix untill hadolint it available by downstream
|
||||||
|
# if ! apt-cache search hadolint | grep -qP "^hadolint -"; then
|
||||||
|
# # Install hadolint if not already installed through apt
|
||||||
|
# if ! apt list --installed | grep -qP "^hadolint -"; then
|
||||||
|
# if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if command -v wget >/dev/null; then apt install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt install -y hadolint; fi
|
||||||
|
# fi
|
||||||
|
# fi
|
||||||
- name: Linting..
|
- name: Linting..
|
||||||
run: |
|
run: |
|
||||||
cd "$GITHUB_WORKSPACE" && for file in $(git ls-tree --name-only -r ${{ github.sha }} | grep '\.Dockerfile$'); do
|
cd "$GITHUB_WORKSPACE" && for file in $(git ls-tree --name-only -r ${{ github.sha }} | grep '\.Dockerfile$'); do
|
||||||
printf 'checking dockerfile %s using hadolint\n' "$file"
|
printf 'checking dockerfile %s using hadolint\n' "$file"
|
||||||
hadolint "$file"
|
docker run hadolint:latest hadolint "$file"
|
||||||
done
|
done
|
@ -12,3 +12,4 @@ vscode:
|
|||||||
- timonwong.shellcheck@0.9.0:hsU/Rd39aqPYowTqL+DbXg==
|
- timonwong.shellcheck@0.9.0:hsU/Rd39aqPYowTqL+DbXg==
|
||||||
- krosf.vscode-valgrind@0.0.1:YTn5lOY8OnPKJYDqJPr/Sg==
|
- krosf.vscode-valgrind@0.0.1:YTn5lOY8OnPKJYDqJPr/Sg==
|
||||||
- matklad.rust-analyzer@0.1.20200217:zozmBmOg1N91pRISIsYXBg==
|
- matklad.rust-analyzer@0.1.20200217:zozmBmOg1N91pRISIsYXBg==
|
||||||
|
- exiasr.hadolint@0.3.0:/FkAW3eTb+z9O7VZAyAa0w==
|
@ -1,6 +1,8 @@
|
|||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
|
|
||||||
# FIXME: Outputs `gitpod@ws-ce281d58-997b-44b8-9107-3f2da7feede3:/workspace/gitpod-tests1$` in terminal
|
# FIXME: Outputs `gitpod@ws-ce281d58-997b-44b8-9107-3f2da7feede3:/workspace/gitpod-tests1$` in terminal
|
||||||
|
# FIXME: Add hadolint executable
|
||||||
|
|
||||||
|
|
||||||
# To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171)
|
# To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171)
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
@ -25,7 +27,9 @@ RUN useradd \
|
|||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt upgrade -y \
|
&& apt upgrade -y \
|
||||||
&& apt dist-upgrade -y \
|
&& apt dist-upgrade -y \
|
||||||
&& apt install -y rustc \
|
&& apt install -y rustc cargo \
|
||||||
|
&& : "Install hadolint if not available in downstream" \
|
||||||
|
&& if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if command -v wget >/dev/null; then apt install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt install -y hadolint; fi \
|
||||||
&& apt autoremove -y \
|
&& apt autoremove -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
FROM gitpod/workspace-full-vnc:latest
|
FROM gitpod/workspace-full-vnc:latest
|
||||||
|
|
||||||
|
# FIXME: Add hadolint executable
|
||||||
|
|
||||||
# To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171)
|
# To avoid bricked workspaces (https://github.com/gitpod-io/gitpod/issues/1171)
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
@ -13,6 +15,8 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|||||||
&& apt-get upgrade -y \
|
&& apt-get upgrade -y \
|
||||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
|
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
|
||||||
&& apt dist-upgrade -y \
|
&& apt dist-upgrade -y \
|
||||||
|
&& : "Install hadolint if not available in downstream" \
|
||||||
|
&& if ! apt-cache search hadolint | grep -qP "^hadolint -.*"; then { if command -v wget >/dev/null; then apt install -y wget; fi ;} && wget https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 -O /usr/bin/hadolint && { [ ! -x hadolint ] && chmod +x /usr/bin/hadolint ;}; elif apt-cache search hadolint | grep -qP "^hadolint -.*"; then apt install -y hadolint; fi \
|
||||||
&& apt-get install -y clang valgrind shellcheck docker-ce docker-ce-cli containerd.io firefox tree xclip umbrello gnuplot fish zsh dia \
|
&& apt-get install -y clang valgrind shellcheck docker-ce docker-ce-cli containerd.io firefox tree xclip umbrello gnuplot fish zsh dia \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& apt autoremove -y
|
&& apt autoremove -y
|
||||||
|
Loading…
Reference in New Issue
Block a user