Skip to content

Commit 0c47e43

Browse files
authored
Merge pull request #68 from cookienc/optimize
Optimize Dockerfile to reduce image size
2 parents 82f26f5 + 8679f46 commit 0c47e43

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Dockerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# Copyright (c) 2022 LG Electronics Inc.
22
# SPDX-License-Identifier: Apache-2.0
3-
FROM ubuntu:20.04
3+
FROM python:3.8-slim-buster
44

5-
RUN apt-get update && apt-get install sudo -y
6-
RUN ln -sf /bin/bash /bin/sh
7-
8-
COPY . /app
5+
COPY . /app
96
WORKDIR /app
107

11-
ENV DEBIAN_FRONTEND=noninteractive
8+
RUN ln -sf /bin/bash /bin/sh && \
9+
apt-get update && \
10+
apt-get install --no-install-recommends -y \
11+
build-essential \
12+
python3 python3-distutils python3-pip python3-dev python3-magic \
13+
libxml2-dev \
14+
libxslt1-dev \
15+
libhdf5-dev \
16+
bzip2 xz-utils zlib1g libpopt0 && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*
1219

13-
RUN apt-get -y install build-essential
14-
RUN apt-get -y install python3 python3-distutils python3-pip python3-dev
15-
RUN apt-get -y install python3-intbitset python3-magic
16-
RUN apt-get -y install libxml2-dev
17-
RUN apt-get -y install libxslt1-dev
18-
RUN apt-get -y install libhdf5-dev
19-
RUN apt-get -y install bzip2 xz-utils zlib1g libpopt0
20-
RUN apt-get -y install gcc-10 g++-10
21-
RUN pip3 install --upgrade pip
22-
RUN pip3 install .
23-
RUN pip3 install dparse
20+
RUN pip3 install --upgrade pip && \
21+
pip3 install . && \
22+
pip3 install dparse && \
23+
rm -rf ~/.cache/pip /root/.cache/pipe
2424

25-
ENTRYPOINT ["/usr/local/bin/fosslight"]
25+
ENTRYPOINT ["/usr/local/bin/fosslight"]

0 commit comments

Comments
 (0)