Browse Source

add the dos2unix for win;

tags/1.4.0^2
zhaoguangwei 4 years ago
parent
commit
a61f3453e7
3 changed files with 18 additions and 7 deletions
  1. +15
    -1
      deploy/docker-demo/pom.xml
  2. +2
    -0
      deploy/docker-demo/src/main/docker/Dockerfile
  3. +1
    -6
      deploy/docker-sdk/src/main/java/com/jd/blockchain/SDK_Base_Demo.java

+ 15
- 1
deploy/docker-demo/pom.xml View File

@@ -10,12 +10,26 @@
</parent>
<version>1.3.0</version>
<modelVersion>4.0.0</modelVersion>

<artifactId>docker-demo</artifactId>

<build>
<finalName>jdchain-demo</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<optimize>false</optimize>
<debug>true</debug>
<showDeprecation>false</showDeprecation>
<showWarnings>false</showWarnings>
</configuration>
</plugin>

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>


+ 2
- 0
deploy/docker-demo/src/main/docker/Dockerfile View File

@@ -5,6 +5,7 @@ RUN yum install wget -y \
&& wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo \
&& yum install java net-tools nc crontabs expect unzip -y \
&& yum install langpacks-zh_CN.noarch -y \
&& yum install dos2unix -y \
&& echo "LANG=zh_CN.utf8" >> /etc/locale.conf \
&& source /etc/locale.conf \
&& yum clean all
@@ -21,6 +22,7 @@ ENV SERVER_NAME_PEER=deploy-peer
ENV SERVER_NAME_GW=deploy-gateway

COPY script/* /export/jdchain/
RUN dos2unix /export/jdchain/*.sh
RUN chmod +x /export/jdchain/*.sh

# ports


+ 1
- 6
deploy/docker-sdk/src/main/java/com/jd/blockchain/SDK_Base_Demo.java View File

@@ -162,12 +162,7 @@ public abstract class SDK_Base_Demo {
System.out.println("contract's address=" + contractAddress);

// 生成发布合约操作
if(contractParams.isHasVersion()){
// txTpl.contracts().deploy(contractParams.contractIdentity, contractCode, contractParams.version);
} else {
txTpl.contracts().deploy(contractParams.contractIdentity, contractCode);
}

txTpl.contracts().deploy(contractParams.contractIdentity, contractCode);

// 生成预发布交易;
commit(txTpl,contractParams.getSignAdminKey());


Loading…
Cancel
Save