cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [cassandra-website] ossarga commented on a change in pull request #6: Make sure the home directory in the docker container has correct permissions
Date Wed, 29 Apr 2020 04:27:09 GMT

ossarga commented on a change in pull request #6:

File path: Dockerfile
@@ -39,18 +39,19 @@ RUN gem install bundler && \
     bundle install && \
     rm /Gemfile /Gemfile.lock
-# Run as build user from here
-USER build
 ENV CASSANDRA_DIR="/home/build/cassandra"
 # Setup repositories to building the docs
-RUN mkdir -p /home/build/cassandra-site && \
-    git clone ${CASSANDRA_DIR}
+RUN mkdir -p /home/build/cassandra-site
+RUN git clone ${CASSANDRA_DIR}
+# hack: give build user rw access, eg on the asf websites jenkins agent
+RUN chmod -R a+rw /home/build/

Review comment:
       I think we should try and chain together the process for setting up the directories
to build the docs. The reason being is we prevent the container from caching these steps and
skipping them if one of the later steps changes. Further information about this can be found
in the [Dockerfile best practices](
docs. [Stack Overflow](
has a good explanation about why we might want to do this as well.
   Given the operations we need to do now (i.e. change dir permissions), we should rework
this section to look something like this. It makes the operations easier to follow and more
   ENV BUILD_DIR="/home/build"
   # Setup directories for building the docs
   # As part of the setup give the build user rw access to the build directory and its children.
e.g. on the ASF websites jenkins agent.
   RUN mkdir -p ${BUILD_DIR}/cassandra-site && \
       git clone ${BUILD_DIR}/cassandra
&& \
       chmod -R a+rw ${BUILD_DIR}
   If we did the above, then we would replace the `ENV CASSANDRA_DIR` with the `ENV BUILD_DIR`

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.

For queries about this service, please contact Infrastructure at:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message