Browse Source

cleaned packages and failes after installation

master
Robin Thoni 6 years ago
parent
commit
ab4561e0a1
1 changed files with 14 additions and 6 deletions
  1. 14
    6
      Dockerfile

+ 14
- 6
Dockerfile View File

7
 ARG PG_VERSION_=9_6_3
7
 ARG PG_VERSION_=9_6_3
8
 
8
 
9
 RUN apt-get update && apt-get -y install\
9
 RUN apt-get update && apt-get -y install\
10
+        zlib1g\
11
+        libreadline6\
10
         wget\
12
         wget\
11
         bison\
13
         bison\
12
         flex\
14
         flex\
13
         tar\
15
         tar\
14
         gzip\
16
         gzip\
15
         libreadline-dev\
17
         libreadline-dev\
18
+        make\
19
+        zlib1g-dev\
16
         git &&\
20
         git &&\
17
         apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
21
         apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
18
 
22
 
19
 RUN wget "https://github.com/postgres/postgres/archive/REL${PG_VERSION_}.tar.gz" &&\
23
 RUN wget "https://github.com/postgres/postgres/archive/REL${PG_VERSION_}.tar.gz" &&\
20
     tar xf REL${PG_VERSION_}.tar.gz
24
     tar xf REL${PG_VERSION_}.tar.gz
21
 
25
 
22
-RUN apt-get update
23
-
24
-RUN apt-get -y install\
25
-        zlib1g-dev\
26
-        make
27
-
28
 RUN cd postgres-REL${PG_VERSION_} &&\
26
 RUN cd postgres-REL${PG_VERSION_} &&\
29
     ./configure --prefix=/usr/ &&\
27
     ./configure --prefix=/usr/ &&\
30
     make &&\
28
     make &&\
31
     make install
29
     make install
32
 
30
 
31
+RUN apt-get autoremove -y \
32
+        wget\
33
+        bison\
34
+        flex\
35
+        libreadline-dev\
36
+        make\
37
+        zlib1g-dev\
38
+        git &&\
39
+        rm -rf REL${PG_VERSION_}.tar.gz postgres-REL${PG_VERSION_}
40
+
33
 RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
41
 RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
34
 
42
 
35
 ENV GOSU_VERSION 1.7
43
 ENV GOSU_VERSION 1.7

Loading…
Cancel
Save