Skip to content

Commit d08237c

Browse files
[CI] Fix linter issues in Ubuntu Dockerfile
1 parent fe5c223 commit d08237c

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/docker/ubuntu-22.04.Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2023 Intel Corporation
1+
# Copyright (C) 2023-2024 Intel Corporation
22
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
33
# See LICENSE.TXT
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -51,20 +51,23 @@ RUN apt-get update \
5151
${BASE_DEPS} \
5252
${UR_DEPS} \
5353
${MISC_DEPS} \
54+
&& rm -rf /var/lib/apt/lists/* \
5455
&& apt-get clean all
5556

56-
RUN pip3 install ${UR_PYTHON_DEPS}
57+
# pip package is pinned to a version, but it's probably improperly parsed here
58+
# hadolint ignore=DL3013
59+
RUN pip3 install --no-cache-dir ${UR_PYTHON_DEPS}
5760

5861
# Install DPC++
59-
COPY install_dpcpp.sh install_dpcpp.sh
62+
COPY install_dpcpp.sh /opt/install_dpcpp.sh
6063
ENV DPCPP_PATH=/opt/dpcpp
61-
RUN ./install_dpcpp.sh
64+
RUN /opt/install_dpcpp.sh
6265

6366
# Install libbacktrace
64-
COPY install_libbacktrace.sh install_libbacktrace.sh
65-
RUN ./install_libbacktrace.sh
67+
COPY install_libbacktrace.sh /opt/install_libbacktrace.sh
68+
RUN /opt/install_libbacktrace.sh
6669

6770
# Add a new (non-root) 'user'
6871
ENV USER user
6972
ENV USERPASS pass
70-
RUN useradd -m $USER -g sudo -p `mkpasswd $USERPASS`
73+
RUN useradd -m "${USER}" -g sudo -p "$(mkpasswd ${USERPASS})"

.github/workflows/hadolint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ jobs:
3030
with:
3131
recursive: true
3232
dockerfile: ".github/docker/*Dockerfile"
33+
# ignore pinning apt packages to versions
34+
ignore: DL3008

0 commit comments

Comments
 (0)