This is an automated email from the ASF dual-hosted git repository.

ywkim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 30d3e08  BIGTOP-3261 Fix broken BPS Dockerfile
30d3e08 is described below

commit 30d3e0839a660084793c910cace6a61c98934845
Author: Ben <[email protected]>
AuthorDate: Wed May 29 20:09:23 2019 -0400

    BIGTOP-3261 Fix broken BPS Dockerfile
    
    Update dockerfile to remove dependency on gradle and use only docker for 
the build.
    
    Signed-off-by: Youngwoo Kim <[email protected]>
---
 .../bigpetstore-transaction-queue/.dockerignore    |  3 +++
 .../bigpetstore-transaction-queue/Dockerfile       | 26 +++++++++-------------
 .../bigpetstore-transaction-queue/README.md        |  5 ++---
 .../bigpetstore-transaction-queue/settings.gradle  | 16 +++++++++++++
 4 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/bigtop-bigpetstore/bigpetstore-transaction-queue/.dockerignore 
b/bigtop-bigpetstore/bigpetstore-transaction-queue/.dockerignore
new file mode 100644
index 0000000..eea7a5a
--- /dev/null
+++ b/bigtop-bigpetstore/bigpetstore-transaction-queue/.dockerignore
@@ -0,0 +1,3 @@
+.gradle
+.settings
+build
\ No newline at end of file
diff --git a/bigtop-bigpetstore/bigpetstore-transaction-queue/Dockerfile 
b/bigtop-bigpetstore/bigpetstore-transaction-queue/Dockerfile
index 3f43aa6..e173f56 100644
--- a/bigtop-bigpetstore/bigpetstore-transaction-queue/Dockerfile
+++ b/bigtop-bigpetstore/bigpetstore-transaction-queue/Dockerfile
@@ -12,22 +12,18 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-FROM centos:7
-MAINTAINER [email protected]
-RUN yum update -y
-RUN yum install -y java-1.8.0-openjdk unzip wget
-RUN yum install -y java-1.8.0-openjdk-devel
+FROM gradle:5.6.3-jdk12 as build
+
+ADD . /bigpetstore-transaction-queue
+WORKDIR /bigpetstore-transaction-queue
+
+RUN [ "gradle", "fatJar" ]
+
+FROM openjdk:14-ea-12-jdk-alpine3.10
+LABEL maintainer="[email protected]"
 
 WORKDIR /opt/
 
-# Get Bigtop
-# This comes with a gradlew wrapper we can use.
-RUN wget 
http://www.apache.org/dist/bigtop/bigtop-1.0.0/bigtop-1.0.0-project.tar.gz
-RUN  tar -xvf bigtop-1.0.0-project.tar.gz
+COPY --from=build 
/bigpetstore-transaction-queue/build/libs/bigpetstore-transaction-queue-all-1.0.jar
 /opt
 
-# Install bigpetstore transaction queue
-WORKDIR /opt/bigtop-1.0.0/bigtop-bigpetstore/bigpetstore-transaction-queue
-RUN /opt/bigtop-1.0.0/gradlew distZip
-RUN unzip build/distributions/bigpetstore-transaction-queue-1.0.zip
-RUN mv ./bigpetstore-transaction-queue-1.0 
/opt/bigpetstore-transaction-queue-1.0/
-CMD 
/opt/bigpetstore-transaction-queue-1.0/bigpetstore-transaction-queue-1.0/bin/bigpetstore-transaction-queue
+ENTRYPOINT ["java", "-jar", "bigpetstore-transaction-queue-all-1.0.jar"]
diff --git a/bigtop-bigpetstore/bigpetstore-transaction-queue/README.md 
b/bigtop-bigpetstore/bigpetstore-transaction-queue/README.md
index 7782e1c..e60d106 100644
--- a/bigtop-bigpetstore/bigpetstore-transaction-queue/README.md
+++ b/bigtop-bigpetstore/bigpetstore-transaction-queue/README.md
@@ -73,7 +73,7 @@ The command line arguments are:
 From docker
 
 ```
-docker run -t -i jayunit100/bigpetstore-load-generator  
/opt/bigpetstore-transaction-queue-1.0/bin/bigpetstore-transaction-queue /tmp/ 
1 1 3.0
+docker run -t -i jayunit100/bigpetstore-load-generator /tmp/ 1 1 3.0
 ```
 or Java
 ```
@@ -87,8 +87,7 @@ OR Replace the file path with a REST API root (it will 
jsonify the transactions,
 From docker
 
 ```
-docker run -t -i jayunit100/bigpetstore-load-generator 
/opt/bigpetstore-transaction-queue-1.0/bin/bigpetstore-transaction-queue
- http://localhost:3000/restapi/rpush/ 1 5 10000 123
+docker run -t -i jayunit100/bigpetstore-load-generator 
http://localhost:3000/restapi/rpush/ 1 5 10000 123
 ```
 Or from java
 ```
diff --git a/bigtop-bigpetstore/bigpetstore-transaction-queue/settings.gradle 
b/bigtop-bigpetstore/bigpetstore-transaction-queue/settings.gradle
new file mode 100644
index 0000000..ed284e5
--- /dev/null
+++ b/bigtop-bigpetstore/bigpetstore-transaction-queue/settings.gradle
@@ -0,0 +1,16 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
\ No newline at end of file

Reply via email to