-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (41 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
47 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG base_image
FROM ${base_image} as base
LABEL maintainer="Codacy Team <code@codacy.com>"
RUN \
apt-get -y update && \
apt-get -y install unzip git && \
apt-get -y upgrade && \
rm -rf /root/.cache && \
apt-get purge -y $(apt-cache search '~c' | awk '{ print $2 }') && \
apt-get -y autoremove && \
apt-get -y autoclean && \
apt-get -y clean all && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt && \
rm -rf /tmp/*
# Git and SSH Configs
RUN \
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \
git config --global core.quotepath false && \
git config --global core.packedGitLimit 512m && \
git config --global core.packedGitWindowSize 512m && \
git config --global pack.deltaCacheSize 2047m && \
git config --global pack.packSizeLimit 2047m && \
git config --global pack.windowMemory 2047m
ENV TINI_VERSION v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
FROM base as withtools
RUN \
apt-get -y update && \
apt-get -y install apparmor libdevmapper1.02.1 && \
apt-get -y install libltdl-dev && \
ln -s /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 /lib/x86_64-linux-gnu/libdevmapper.so.1.02 && \
apt-get purge -y $(apt-cache search '~c' | awk '{ print $2 }') && \
apt-get -y autoremove && \
apt-get -y autoclean && \
apt-get -y clean all && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt && \
rm -rf /var/cache/oracle-jdk8-installer && \
rm -rf /tmp/*