From db5bfa1817a8e3f62fbd19b33da6ba9a013642de Mon Sep 17 00:00:00 2001 From: Audrius Mecionis Date: Mon, 16 Nov 2020 15:42:15 +0100 Subject: [PATCH] ci: add Dockerfile linting addresses https://github.com/reanahub/reana/issues/450 --- .github/workflows/ci.yml | 19 +++++++++++++++++++ Dockerfile | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ab21c21 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +# This file is part of REANA. +# Copyright (C) 2020 CERN. +# +# REANA is free software; you can redistribute it and/or modify it +# under the terms of the MIT License; see LICENSE file for more details. + +name: CI + +on: [push, pull_request] + +jobs: + lint-dockerfile: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Check Dockerfile compliance + run: docker run -i --rm hadolint/hadolint < Dockerfile diff --git a/Dockerfile b/Dockerfile index 7851586..cb8b04b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ FROM ubuntu:18.04 # tools needed to setup repository +# hadolint ignore=DL3027 RUN apt update; \ DEBIAN_FRONTEND=noninteractive apt upgrade -y; \ apt install -y wget gnupg; # setup of the fcc apt repository +# hadolint ignore=DL3027 RUN wget -q https://fcc-pileup.web.cern.ch/fcc-pileup/sw/latest/x86_64-ubuntu1804-gcc8-opt/keyFile; \ apt-key add keyFile; \ rm keyFile; \ @@ -14,6 +16,7 @@ RUN wget -q https://fcc-pileup.web.cern.ch/fcc-pileup/sw/latest/x86_64-ubuntu18 DEBIAN_FRONTEND=noninteractive apt upgrade -y; \ apt install -y hep-fccsw; # download data files needed to run geant4 +# hadolint ignore=DL3027 RUN apt install -y hep-geant4data; ## necessary shell environment (usually sourced from /etc/profile) ENV G4NEUTRONHPDATA=/usr/local/share/Geant4/data/G4NDL4.5 \ @@ -40,5 +43,6 @@ ENV G4NEUTRONHPDATA=/usr/local/share/Geant4/data/G4NDL4.5 \ CPLUS_INCLUDE_DIR=$CPLUS_INCLUDE_DIR:/usr/local/include \ GAUDI_LIBRARY_PATH=/usr/local/lib \ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib +# hadolint ignore=DL3027 RUN DEBIAN_FRONTEND=noninteractive apt install -y python-scipy python-matplotlib;