[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323920#comment-16323920
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user RobberPhex commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1464#discussion_r161216512
  
--- Diff: build/docker/ubuntu-artful/Dockerfile ---
@@ -41,10 +43,21 @@ RUN apt-get update && \
 
 # dotnet (core)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor 
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
-echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> /etc/apt/sources.list.d/dotnetdev.list
+echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> \
+/etc/apt/sources.list.d/dotnetdev.list
 
-# node.js (this step runs apt-get update internally) - if we ever want a 
later version
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
+# node.js
+RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo 
apt-key add - \
+echo "deb https://deb.nodesource.com/node_8.x artful main" | sudo tee 
/etc/apt/sources.list.d/nodesource.list
+# D
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
EBCF975E5BA24D5E && \
+wget 
http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
/etc/apt/sources.list.d/d-apt.list && \
+wget -qO - https://dlang.org/d-keyring.gpg | apt-key add -
+
+# Dart
+RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key 
add - && \
+curl 
https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
 > \
+/etc/apt/sources.list.d/dart_stable.list
--- End diff --

`apt-get install nodejs` run at line 137


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323915#comment-16323915
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user jeking3 commented on the issue:

https://github.com/apache/thrift/pull/1464
  
I wish Dockerfile had a INCLUDE directive where common stuff could be 
factored out!


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323911#comment-16323911
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user jeking3 commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1464#discussion_r161215273
  
--- Diff: build/docker/ubuntu-artful/Dockerfile ---
@@ -41,10 +43,21 @@ RUN apt-get update && \
 
 # dotnet (core)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor 
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
-echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> /etc/apt/sources.list.d/dotnetdev.list
+echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> \
+/etc/apt/sources.list.d/dotnetdev.list
--- End diff --

Indent this so it makes more sense (it looks like a separate command)


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323912#comment-16323912
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user jeking3 commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1464#discussion_r161215374
  
--- Diff: build/docker/ubuntu-artful/Dockerfile ---
@@ -41,10 +43,21 @@ RUN apt-get update && \
 
 # dotnet (core)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor 
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
-echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> /etc/apt/sources.list.d/dotnetdev.list
+echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> \
+/etc/apt/sources.list.d/dotnetdev.list
 
-# node.js (this step runs apt-get update internally) - if we ever want a 
later version
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
+# node.js
+RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo 
apt-key add - \
--- End diff --

where is the node.js setup run?


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323909#comment-16323909
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user jeking3 commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1464#discussion_r161215006
  
--- Diff: build/docker/ubuntu-artful/Dockerfile ---
@@ -41,10 +43,21 @@ RUN apt-get update && \
 
 # dotnet (core)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor 
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
-echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> /etc/apt/sources.list.d/dotnetdev.list
+echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> \
+/etc/apt/sources.list.d/dotnetdev.list
 
-# node.js (this step runs apt-get update internally) - if we ever want a 
later version
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
+# node.js
+RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo 
apt-key add - \
+echo "deb https://deb.nodesource.com/node_8.x artful main" | sudo tee 
/etc/apt/sources.list.d/nodesource.list
+# D
+RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
EBCF975E5BA24D5E && \
+wget 
http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O 
/etc/apt/sources.list.d/d-apt.list && \
+wget -qO - https://dlang.org/d-keyring.gpg | apt-key add -
+
+# Dart
+RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key 
add - && \
+curl 
https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
 > \
+/etc/apt/sources.list.d/dart_stable.list
--- End diff --

You need to run apt-get update here after adding these repositories.


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323895#comment-16323895
 ] 

ASF GitHub Bot commented on THRIFT-4452:


Github user jeking3 commented on a diff in the pull request:

https://github.com/apache/thrift/pull/1464#discussion_r161212364
  
--- Diff: build/docker/ubuntu-artful/Dockerfile ---
@@ -41,10 +43,21 @@ RUN apt-get update && \
 
 # dotnet (core)
 RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor 
> /etc/apt/trusted.gpg.d/microsoft.gpg && \
-echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> /etc/apt/sources.list.d/dotnetdev.list
+echo "deb [arch=amd64] 
https://packages.microsoft.com/repos/microsoft-ubuntu-artful-prod artful main" 
> \
+/etc/apt/sources.list.d/dotnetdev.list
 
-# node.js (this step runs apt-get update internally) - if we ever want a 
later version
-RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
+# node.js
+RUN curl -sL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo 
apt-key add - \
--- End diff --

sudo is unnecessary and causes a failure in a docker container (see build)


> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (THRIFT-4452) optimize Dockerfile (only onetime apt-get update)

2018-01-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-4452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16323507#comment-16323507
 ] 

ASF GitHub Bot commented on THRIFT-4452:


GitHub user RobberPhex opened a pull request:

https://github.com/apache/thrift/pull/1464

THRIFT-4452: optimize Dockerfile

Docker build flow:

1. add all repo
2. `apt-get update` (only one time)
3. install dependencies

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/RobberPhex/thrift dockerfile

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/thrift/pull/1464.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1464


commit a15a2d9bc2e952d984d20a08b7750eac24a3fa09
Author: Robert Lu 
Date:   2018-01-05T05:44:38Z

optimize Dockerfile




> optimize Dockerfile (only onetime apt-get update)
> -
>
> Key: THRIFT-4452
> URL: https://issues.apache.org/jira/browse/THRIFT-4452
> Project: Thrift
>  Issue Type: Improvement
>  Components: Build Process
>Affects Versions: 0.11.0
>Reporter: Robert Lu
>Assignee: Robert Lu
>Priority: Minor
>
> When build 
> [apache/thrift-build|https://github.com/apache/thrift/blob/a15060a/build/docker/ubuntu-trusty/Dockerfile],
>  there are many times to run apt-get update.
> We can just run one time apt-get update after add all repo.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)