Skip to content

Commit dd0b4f0

Browse files
committed
Combine configuration and reindexing into one RUN instruction
Dockerfile best practice is to combine successive RUN commands so as to minimise image layers. Signed-off-by: Abhishek Kumar <abhi.kr.2100@gmail.com>
1 parent 442daf9 commit dd0b4f0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ WORKDIR /scancode-toolkit
3737
# Copy sources into docker container
3838
COPY . /scancode-toolkit
3939

40-
# Initial configuration
41-
RUN ./configure
42-
43-
# Run scancode-reindex-licenses to build the base license index
44-
RUN ./venv/bin/scancode-reindex-licenses
40+
# Initial configuration using ./configure, scancode-reindex-licenses to build
41+
# the base license index
42+
RUN ./configure \
43+
&& ./venv/bin/scancode-reindex-licenses
4544

4645
# Add scancode to path
4746
ENV PATH=/scancode-toolkit:$PATH

0 commit comments

Comments
 (0)