-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize dockerfile to reduce image size (#136)
Signed-off-by: jaehee329 <[email protected]>
- Loading branch information
Showing
2 changed files
with
16 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
# Copyright (c) 2021 LG Electronics Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
FROM ubuntu:20.04 | ||
FROM python:3.8-slim-buster | ||
|
||
RUN apt-get clean | ||
RUN apt-get update && apt-get install sudo -y | ||
RUN ln -sf /bin/bash /bin/sh | ||
RUN ln -sf /bin/bash /bin/sh && \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
build-essential \ | ||
python3 python3-distutils python3-pip python3-dev python3-magic \ | ||
libxml2-dev libxslt1-dev libhdf5-dev bzip2 xz-utils zlib1g libpopt0 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
COPY . /app | ||
WORKDIR /app | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
COPY . /app | ||
|
||
RUN apt-get -y install build-essential | ||
RUN apt-get -y install python3 python3-distutils python3-pip python3-dev | ||
RUN apt-get -y install python3-intbitset python3-magic | ||
RUN apt-get -y install libxml2-dev | ||
RUN apt-get -y install libxslt1-dev | ||
RUN apt-get -y install libhdf5-dev | ||
RUN apt-get -y install bzip2 xz-utils zlib1g libpopt0 | ||
RUN apt-get -y install gcc-10 g++-10 | ||
RUN pip3 install --upgrade pip | ||
RUN pip3 install . | ||
RUN pip3 install dparse | ||
RUN pip3 install --upgrade pip && \ | ||
pip3 install . && \ | ||
pip3 install dparse && \ | ||
rm -rf ~/.cache/pip /root/.cache/pipe | ||
|
||
ENTRYPOINT ["/usr/local/bin/fosslight_source"] | ||
ENTRYPOINT ["/usr/local/bin/fosslight_source"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ typecode-libmagic | |
fosslight_util>=1.4.28 | ||
PyYAML | ||
wheel>=0.38.1 | ||
intbitset | ||
fosslight_binary |