Merge pull request #7433 from issyl0/lint-dockerfile
Lint the homebrew/brew Dockerfile with `hadolint`
This commit is contained in:
commit
3911ff4080
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -161,6 +161,12 @@ jobs:
|
||||
brew install vale
|
||||
vale docs/
|
||||
|
||||
- name: Lint Dockerfile
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
brew install hadolint
|
||||
hadolint Dockerfile
|
||||
|
||||
- name: Build Docker image
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
|
@ -1,6 +1,7 @@
|
||||
FROM ubuntu:xenial
|
||||
LABEL maintainer="Shaun Jackman <sjackman@gmail.com>"
|
||||
|
||||
# hadolint ignore=DL3008
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends software-properties-common \
|
||||
&& add-apt-repository -y ppa:git-core/ppa \
|
||||
@ -27,8 +28,10 @@ RUN apt-get update \
|
||||
RUN localedef -i en_US -f UTF-8 en_US.UTF-8 \
|
||||
&& useradd -m -s /bin/bash linuxbrew \
|
||||
&& echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
|
||||
ADD . /home/linuxbrew/.linuxbrew/Homebrew
|
||||
COPY . /home/linuxbrew/.linuxbrew/Homebrew
|
||||
ARG FORCE_REBUILD
|
||||
|
||||
# hadolint ignore=DL3003
|
||||
RUN cd /home/linuxbrew/.linuxbrew \
|
||||
&& mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar \
|
||||
&& ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/ \
|
||||
|
Loading…
x
Reference in New Issue
Block a user