You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
868 B

12 months ago
#### 1、在$OpenJDK$下安装$jar$命令
```
yum install java-1.8.0-openjdk-devel
```
11 months ago
#### 2、将文件复制到容器外
12 months ago
11 months ago
```
docker cp 83bbd9bd5d80:/root/gw-charge.jar ./
12 months ago
```
12 months ago
#### 3、解压$JAR$包
12 months ago
12 months ago
```shell
# 解压 jar 到gw-charge目录下
unzip gw-charge.jar -d gw-charge
11 months ago
# 下载旧的jar包备份防止出意外
sz ms-task.jar
12 months ago
```
12 months ago
12 months ago
#### 4、修改配置文件或添加$class$
12 months ago
12 months ago
```shell
12 months ago
```
12 months ago
#### 5、打包$JAR$
```shell
11 months ago
# 如果不进去目录直接打包会发现多了一层目录gw-charge,这样启动jar会报错
11 months ago
cd gw-charge
jar -cvfM0 ../gw-charge.jar ./
# 删除用完的目录
rm -rf gw-charge
```
#### 6、将文件复制回容器
```
docker cp ./gw-charge.jar 83bbd9bd5d80:/root/gw-charge.jar
```
#### 7、重新启动 $Docker$容器
```shell
docker restart 83bbd9bd5d80
12 months ago
```