Skip to content

Commit c1b2584

Browse files
author
Stephan Enderlein
committed
add Dockerfile to run aboutcode with docker
Signed-off-by: Stephan Enderlein <[email protected]>
1 parent 74cc51a commit c1b2584

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
5+
# See https://github.com/nexB/aboutcode-toolkit for support or download.
6+
# See https://aboutcode.org for more information about nexB OSS projects.
7+
#
8+
9+
FROM python:3.6-slim-buster
10+
11+
RUN apt-get update \
12+
&& apt-get install -y bash bzip2 xz-utils zlib1g libxml2-dev libxslt1-dev libgomp1 libpopt0\
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
15+
16+
# Create directory for aboutcode sources
17+
RUN mkdir aboutcode-toolkit
18+
19+
# Copy sources into docker container
20+
COPY . aboutcode-toolkit
21+
22+
# Set workdir
23+
WORKDIR aboutcode-toolkit
24+
25+
RUN bash -c "source ./configure"
26+
27+
# Add aboutcode to path
28+
#ENV PATH=$HOME/aboutcode-toolkit:$PATH
29+
30+
# Set entrypoint to be the aboutcode command, allows to run the generated docker image directly with the aboutcode arguments:
31+
# `docker run (...) <containername> <about arguments>`
32+
# Example: docker run --rm --name "aboutcode" -v ${PWD}:/project -v /tmp/result:/result aboutcode-toolkit attrib /project /result/c.html
33+
ENTRYPOINT ["./bin/about"]

0 commit comments

Comments
 (0)