|
1 | 1 | <<<<<<< HEAD |
2 | 2 | <<<<<<< HEAD |
3 | 3 | <<<<<<< HEAD |
4 | | - |
| 4 | + |
5 | 5 | ======= |
6 | 6 | >>>>>>> b6d23428 (Revert "Revert "add tests for storing packages"") |
7 | 7 | ======= |
8 | 8 | >>>>>>> 507231a0 (Revert "add tests for storing packages") |
9 | | -# SPDX-License-Identifier: Apache-2.0 |
10 | | -# |
11 | | -# http://nexb.com and https://github.com/aboutcode-org/scancode.io |
12 | | -# The ScanCode.io software is licensed under the Apache License version 2.0. |
13 | | -# Data generated with ScanCode.io is provided as-is without warranties. |
14 | | -# ScanCode is a trademark of nexB Inc. |
15 | | -# |
16 | | -# You may not use this software except in compliance with the License. |
17 | | -# You may obtain a copy of the License at: http://apache.org/licenses/LICENSE-2.0 |
18 | | -# Unless required by applicable law or agreed to in writing, software distributed |
19 | | -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
20 | | -# CONDITIONS OF ANY KIND, either express or implied. See the License for the |
21 | | -# specific language governing permissions and limitations under the License. |
22 | | -# |
23 | | -# Data Generated with ScanCode.io is provided on an "AS IS" BASIS, WITHOUT WARRANTIES |
24 | | -# OR CONDITIONS OF ANY KIND, either express or implied. No content created from |
25 | | -# ScanCode.io should be considered or used as legal advice. Consult an Attorney |
26 | | -# for any legal advice. |
27 | | -# |
28 | | -# ScanCode.io is a free software code scanning tool from nexB Inc. and others. |
29 | | -# Visit https://github.com/aboutcode-org/scancode.io for support and download. |
30 | | - |
31 | | -FROM python:3.13-slim |
32 | | - |
33 | | -LABEL org.opencontainers.image.source="https://github.com/aboutcode-org/scancode.io" |
34 | | -LABEL org.opencontainers.image.description="ScanCode.io" |
35 | | -LABEL org.opencontainers.image.licenses="Apache-2.0" |
36 | | - |
37 | | -ENV APP_NAME scancodeio |
38 | | -ENV APP_USER app |
39 | | -ENV APP_DIR /opt/$APP_NAME |
40 | | -ENV VENV_LOCATION /opt/$APP_NAME/.venv |
41 | | - |
42 | | -# Force Python unbuffered stdout and stderr (they are flushed to terminal immediately) |
43 | | -ENV PYTHONUNBUFFERED 1 |
44 | | -# Do not write Python .pyc files |
45 | | -ENV PYTHONDONTWRITEBYTECODE 1 |
46 | | -# Add the app dir in the Python path for entry points availability |
47 | | -ENV PYTHONPATH $PYTHONPATH:$APP_DIR |
48 | | - |
49 | | -# OS requirements as per |
50 | | -# https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html |
51 | | -# Also install universal-ctags and xgettext for symbol and string collection. |
52 | | -RUN apt-get update \ |
53 | | - && apt-get install -y --no-install-recommends \ |
54 | | - bzip2 \ |
55 | | - xz-utils \ |
56 | | - zlib1g \ |
57 | | - libxml2-dev \ |
58 | | - libxslt1-dev \ |
59 | | - libgomp1 \ |
60 | | - libsqlite3-0 \ |
61 | | - libgcrypt20 \ |
62 | | - libpopt0 \ |
63 | | - libzstd1 \ |
64 | | - libgpgme11 \ |
65 | | - libdevmapper1.02.1 \ |
66 | | - libguestfs-tools \ |
67 | | - linux-image-amd64 \ |
68 | | - git \ |
69 | | - wait-for-it \ |
70 | | - universal-ctags \ |
71 | | - gettext \ |
72 | | - && apt-get clean \ |
73 | | - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
74 | | - |
75 | | -# Create the APP_USER group and user |
76 | | -RUN addgroup --system $APP_USER \ |
77 | | - && adduser --system --group --home=$APP_DIR $APP_USER \ |
78 | | - && chown $APP_USER:$APP_USER $APP_DIR |
79 | | - |
80 | | -# Create the /var/APP_NAME directory with proper permission for APP_USER |
81 | | -RUN mkdir -p /var/$APP_NAME \ |
82 | | - && chown $APP_USER:$APP_USER /var/$APP_NAME |
83 | | - |
84 | | -# Setup the work directory and the user as APP_USER for the remaining stages |
85 | | -WORKDIR $APP_DIR |
86 | | -USER $APP_USER |
87 | | - |
88 | | -# Create the virtualenv |
89 | | -RUN python -m venv $VENV_LOCATION |
90 | | -# Enable the virtualenv, similar effect as "source activate" |
91 | | -ENV PATH $VENV_LOCATION/bin:$PATH |
92 | | - |
93 | | -# Create static/ and workspace/ directories |
94 | | -RUN mkdir -p /var/$APP_NAME/static/ \ |
95 | | - && mkdir -p /var/$APP_NAME/workspace/ |
96 | | - |
97 | | -# Install the dependencies before the codebase COPY for proper Docker layer caching |
98 | | -COPY --chown=$APP_USER:$APP_USER pyproject.toml $APP_DIR/ |
99 | | -RUN pip install --no-cache-dir . |
100 | | - |
101 | | -# Copy the codebase and set the proper permissions for the APP_USER |
102 | | -<<<<<<< HEAD |
103 | | -<<<<<<< HEAD |
104 | | -COPY --chown=$APP_USER:$APP_USER . $APP_DIR |
105 | | -======= |
106 | | -COPY --chown=$APP_USER:$APP_USER . $APP_DIR |
107 | | ->>>>>>> b6d23428 (Revert "Revert "add tests for storing packages"") |
108 | | -======= |
109 | 9 | # SPDX-License-Identifier: Apache-2.0 |
110 | 10 | # |
111 | 11 | # http://nexb.com and https://github.com/aboutcode-org/scancode.io |
@@ -200,7 +100,4 @@ RUN pip install --no-cache-dir . |
200 | 100 |
|
201 | 101 | # Copy the codebase and set the proper permissions for the APP_USER |
202 | 102 | COPY --chown=$APP_USER:$APP_USER . $APP_DIR |
203 | | ->>>>>>> ca2f49f5 (Revert "Revert "Revert "add tests for storing packages""") |
204 | | -======= |
205 | | -COPY --chown=$APP_USER:$APP_USER . $APP_DIR |
206 | | ->>>>>>> 507231a0 (Revert "add tests for storing packages") |
| 103 | + |
0 commit comments