[ 
https://issues.apache.org/jira/browse/DRILL-8156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504107#comment-17504107
 ] 

ASF GitHub Bot commented on DRILL-8156:
---------------------------------------

jnturton commented on a change in pull request #2491:
URL: https://github.com/apache/drill/pull/2491#discussion_r823489048



##########
File path: Dockerfile
##########
@@ -56,17 +56,26 @@ RUN VERSION=$(mvn -q -Dexec.executable=echo 
-Dexec.args='${project.version}' --n
 # Set the BASE_IMAGE build arg when you invoke docker build.  
 FROM $BASE_IMAGE
 
-ENV DRILL_HOME=/opt/drill DRILL_USER=drilluser
+ENV DRILL_HOME=/opt/drill
+ENV DRILL_USER=drilluser
+ENV DRILL_USER_HOME=/var/lib/drill
+ENV DRILL_LOG_DIR=$DRILL_USER_HOME/log
+ENV DATA_VOL=/data
 
-RUN mkdir $DRILL_HOME
+RUN mkdir $DRILL_HOME $DATA_VOL
+
+COPY --from=build /opt/drill $DRILL_HOME

Review comment:
       @vvysotskyi I don't think Docker is meant to duplicate data across 
layers this way.   I think that each layer is supposed to be stored as a delta 
from the previous layer (even though it may be reported as having the 
cumulative size of the layers up to that point).  So the layer ordering should 
not affect the size of the final image.  Neverthess I have moved everything 
that I could above the COPY in the Dockerfile and I do still worry about a size 
blowup because when I list images I see 1.47GB for the image from this 
Dockerfile, while pulling apache/drill:1.20.0-openjdk-8 gives me an image 
smaller than 1GB.  
   
   ```
   apache/drill               snapshot-openjdk-8   57306e5337db   3 minutes ago 
   1.47GB
   apache/drill               1.20.0-openjdk-8     7479402ba1b3   6 days ago    
   983MB
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> Declare and chown a /data VOLUME in the Drill Dockerfile
> --------------------------------------------------------
>
>                 Key: DRILL-8156
>                 URL: https://issues.apache.org/jira/browse/DRILL-8156
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Tools, Build & Test
>    Affects Versions: 1.20.0
>            Reporter: James Turton
>            Assignee: James Turton
>            Priority: Minor
>
> Some users of embedded Drill in Docker want to use a Docker volume with 
> Drill, particularly for Drill's persistent local storage so that Drill 
> configuration can persist across container launches.  Because Drill no longer 
> runs as root in the Docker container as of 1.20, these users now need a 
> mountpoint inside that container that has been chowned to drilluser.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to