Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 455f421

Browse files
committed
Tunned Dockerfile
1 parent 0a1b994 commit 455f421

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

Dockerfile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
11
FROM ubuntu:latest
22
ENV DEBIAN_FRONTEND noninteractive
33

4-
RUN apt-get update
5-
RUN apt-get install -y git python3 python3-pip
6-
7-
RUN pip3 install --upgrade pip
8-
9-
RUN apt-get install -y libmysqlclient-dev
10-
RUN apt-get install -y libyaml-dev
11-
RUN apt-get install -y nginx gunicorn supervisor
12-
134
ADD requirements.txt /sherlock/
145

15-
RUN apt-get install -y libffi-dev bcrypt build-essential && \
6+
RUN apt-get update && \
7+
apt-get install -y libffi-dev bcrypt build-essential && \
8+
apt-get install -y git python3 python3-pip && \
9+
apt-get install -y libmysqlclient-dev libyaml-dev nginx gunicorn supervisor && \
10+
pip3 install --upgrade pip && \
1611
pip3 install -r /sherlock/requirements.txt && \
17-
apt-get remove -y libffi-dev bcrypt build-essential
12+
apt-get remove -y libffi-dev bcrypt build-essential && \
13+
apt-get autoremove -y && \
14+
apt-get clean
1815

1916
COPY . /sherlock
20-
2117
WORKDIR /sherlock/frontsherlock/
2218

23-
RUN apt-get install -y curl && \
19+
RUN apt-get update && \
20+
apt-get install -y curl && \
2421
curl -sL https://deb.nodesource.com/setup_8.x | bash && \
2522
apt-get install -y nodejs && \
2623
npm install && \
2724
npm run build && \
2825
rm -rf /sherlock/frontsherlock/node_modules && \
2926
apt-get remove -y nodejs curl && \
30-
apt-get autoremove -y
27+
apt-get autoremove -y && \
28+
apt-get clean
3129

3230
WORKDIR /sherlock/
3331

3432
RUN rm /etc/nginx/sites-enabled/default
3533
COPY app_nginx.conf /etc/nginx/sites-available/
36-
RUN ln -s /etc/nginx/sites-available/app_nginx.conf /etc/nginx/sites-enabled/app_nginx.conf
37-
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
34+
RUN ln -s /etc/nginx/sites-available/app_nginx.conf /etc/nginx/sites-enabled/app_nginx.conf && \
35+
echo "daemon off;" >> /etc/nginx/nginx.conf
3836

3937
# Setup Supervisor
4038
RUN mkdir -p /var/log/supervisor/

0 commit comments

Comments
 (0)