Skip to content

Commit 4e40449

Browse files
authored
Merge pull request #2385 from maxhbr/maxhbr/fixDockerfile
Dockerfile: add -y flag to apt-get, so that it can run noninteractivly
2 parents 4d8a995 + 6281b84 commit 4e40449

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

Dockerfile

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,47 @@
1-
#
2-
# Copyright (c) nexB Inc. and others. All rights reserved.
3-
# SPDX-License-Identifier: Apache-2.0 AND CC-BY-4.0
4-
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/scancode-toolkit for
6-
# support and download. ScanCode is a trademark of nexB Inc.
7-
#
8-
# The ScanCode software is licensed under the Apache License version 2.0.
9-
# The ScanCode open data is licensed under CC-BY-4.0.
10-
#
11-
# Licensed under the Apache License, Version 2.0 (the "License");
12-
# you may not use this file except in compliance with the License.
13-
# You may obtain a copy of the License at
14-
#
15-
# http://www.apache.org/licenses/LICENSE-2.0
16-
#
17-
# Unless required by applicable law or agreed to in writing, software
18-
# distributed under the License is distributed on an "AS IS" BASIS,
19-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20-
# See the License for the specific language governing permissions and
21-
# limitations under the License.
22-
#
23-
24-
FROM python:3.6
25-
26-
# Requirements as per https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html
27-
RUN apt-get update && apt-get install bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev
28-
29-
# Create directory for scancode sources
30-
RUN mkdir scancode-toolkit
31-
32-
# Copy sources into docker container
33-
COPY . scancode-toolkit
34-
35-
# Set workdir
36-
WORKDIR scancode-toolkit
37-
38-
# Run scancode once for initial configuration, with --reindex-licenses to create the base license index
39-
RUN ./scancode --reindex-licenses
40-
41-
# Add scancode to path
42-
ENV PATH=$HOME/scancode-toolkit:$PATH
43-
44-
# Set entrypoint to be the scancode command, allows to run the generated docker image directly with the scancode arguments: `docker run (...) <containername> <scancode arguments>`
45-
ENTRYPOINT ["./scancode"]
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0 AND CC-BY-4.0
4+
#
5+
# Visit https://aboutcode.org and https://github.com/nexB/scancode-toolkit for
6+
# support and download. ScanCode is a trademark of nexB Inc.
7+
#
8+
# The ScanCode software is licensed under the Apache License version 2.0.
9+
# The ScanCode open data is licensed under CC-BY-4.0.
10+
#
11+
# Licensed under the Apache License, Version 2.0 (the "License");
12+
# you may not use this file except in compliance with the License.
13+
# You may obtain a copy of the License at
14+
#
15+
# http://www.apache.org/licenses/LICENSE-2.0
16+
#
17+
# Unless required by applicable law or agreed to in writing, software
18+
# distributed under the License is distributed on an "AS IS" BASIS,
19+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
# See the License for the specific language governing permissions and
21+
# limitations under the License.
22+
#
23+
24+
FROM python:3.6
25+
26+
# Requirements as per https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html
27+
RUN apt-get update \
28+
&& apt-get install -y bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev \
29+
&& rm -rf /var/lib/apt/lists/*
30+
31+
# Create directory for scancode sources
32+
RUN mkdir scancode-toolkit
33+
34+
# Copy sources into docker container
35+
COPY . scancode-toolkit
36+
37+
# Set workdir
38+
WORKDIR scancode-toolkit
39+
40+
# Run scancode once for initial configuration, with --reindex-licenses to create the base license index
41+
RUN ./scancode --reindex-licenses
42+
43+
# Add scancode to path
44+
ENV PATH=$HOME/scancode-toolkit:$PATH
45+
46+
# Set entrypoint to be the scancode command, allows to run the generated docker image directly with the scancode arguments: `docker run (...) <containername> <scancode arguments>`
47+
ENTRYPOINT ["./scancode"]

0 commit comments

Comments
 (0)