Skip to content

Commit 9f00d11

Browse files
authored
Merge pull request #2218 from glimchb/patch-2
ci(lint): adding docker linter
2 parents e98f14f + 6ee9f30 commit 9f00d11

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/ansible-lint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ jobs:
2424
- name: Run tests
2525
run: docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest --disable=MD013 "**/*.md" || true
2626

27+
docker-lint:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: hadolint/[email protected]
32+
with:
33+
recursive: false
34+
ignore: DL3041,DL3059,DL3013
35+
2736
ansible-lint:
2837

2938
runs-on: ubuntu-latest

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM rockylinux:8.8
33
WORKDIR /app
44

55
# why this is not part of prereq.sh ?
6-
RUN dnf install -y python38 iproute
6+
RUN dnf install -y python38 iproute && dnf clean all
77

88
# prereq
99
RUN echo "SELINUX=disabled" > /etc/selinux/config
@@ -19,14 +19,15 @@ RUN dnf install -y \
1919
net-snmp \
2020
net-snmp-utils \
2121
sshpass \
22-
python3-pexpect
22+
python3-pexpect \
23+
&& dnf clean all
2324

2425
# why above RPMs are not enough ?
25-
RUN python3 -m pip install netaddr pexpect
26+
RUN python3 -m pip install --no-cache-dir netaddr pexpect
2627

2728
# why this is not part of prereq.sh ?
2829
# see telemetry/roles/omnia_telemetry_cp/tasks/python_package_installation.yml
29-
RUN python3 -m pip install pyinstaller psutil
30+
RUN python3 -m pip install --no-cache-dir pyinstaller psutil
3031

3132
ENTRYPOINT ["ansible-playbook"]
3233
CMD ["prepare_cp.yml", "-vv"]

0 commit comments

Comments
 (0)