You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/05/03 12:51:03 UTC

[GitHub] [incubator-kvrocks] foxdalas commented on a diff in pull request #550: Refactoring Dockerfile

foxdalas commented on code in PR #550:
URL: https://github.com/apache/incubator-kvrocks/pull/550#discussion_r863739901


##########
Dockerfile:
##########
@@ -15,16 +15,25 @@
 # specific language governing permissions and limitations
 # under the License.
 
-FROM ubuntu:18.04
+FROM ubuntu:22.04 as build
+
+RUN apt update && apt install -y make git autoconf libtool g++
+WORKDIR /kvrocks
+
+COPY . .
+RUN make -j4
+
+
+FROM ubuntu:22.04
 
 RUN apt update && apt install -y libsnappy-dev
 WORKDIR /kvrocks
 
 RUN mkdir /data
-COPY ./build/bin/kvrocks ./bin/
+COPY --from=build /kvrocks/src/kvrocks ./bin/
+
 COPY ./kvrocks.conf  ./conf/
 RUN sed  -i -e 's|dir /tmp/kvrocks|dir /var/lib/kvrocks|g' ./conf/kvrocks.conf
-VOLUME /var/lib/kvrocks

Review Comment:
   Yes sure



-- 
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: dev-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org