|
@ -259,7 +259,7 @@ sudo vi conf/settings.xml |
|
|
|
|
|
|
|
|
![image-20231112155904281](./images/personal_page.png) |
|
|
![image-20231112155904281](./images/personal_page.png) |
|
|
|
|
|
|
|
|
需要把 默认仓库类型 设置为公开。 |
|
|
|
|
|
|
|
|
### **需要把 默认仓库类型 设置为公开。** |
|
|
|
|
|
|
|
|
## `作业 1: 创建完成以后,进入个人实例-命名空间页面,截图插入实验报告。` |
|
|
## `作业 1: 创建完成以后,进入个人实例-命名空间页面,截图插入实验报告。` |
|
|
|
|
|
|
|
@ -324,7 +324,7 @@ jobs: |
|
|
- name: Copy single file to remote |
|
|
- name: Copy single file to remote |
|
|
uses: garygrossgarten/github-action-scp@release |
|
|
uses: garygrossgarten/github-action-scp@release |
|
|
with: |
|
|
with: |
|
|
local: ./docker-compose.yml |
|
|
|
|
|
|
|
|
local: ./dasedevops_spring_demo/docker-compose.yml |
|
|
remote: scp/devops_demo/docker-compose.yml |
|
|
remote: scp/devops_demo/docker-compose.yml |
|
|
host: ${{ secrets.HOST }} |
|
|
host: ${{ secrets.HOST }} |
|
|
username: ${{ secrets.USER_NAME }} |
|
|
username: ${{ secrets.USER_NAME }} |
|
@ -402,9 +402,10 @@ env: |
|
|
编辑 DockerFile 也是为了分别将这六个 module 打包成镜像,上传到镜像仓库中。这么看,这个 yml 文件是不是也不那么复杂?🐶 |
|
|
编辑 DockerFile 也是为了分别将这六个 module 打包成镜像,上传到镜像仓库中。这么看,这个 yml 文件是不是也不那么复杂?🐶 |
|
|
|
|
|
|
|
|
gateway微服务的Dockerfile文件内容如下: |
|
|
gateway微服务的Dockerfile文件内容如下: |
|
|
|
|
|
**在六个文件夹下分别创建名为dockerfile的文件** |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /gateway.jar |
|
|
ADD ./target/*.jar /gateway.jar |
|
@ -415,7 +416,7 @@ EXPOSE 8080 |
|
|
hello微服务的Dockerfile文件内容如下: |
|
|
hello微服务的Dockerfile文件内容如下: |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /hello.jar |
|
|
ADD ./target/*.jar /hello.jar |
|
@ -426,7 +427,7 @@ EXPOSE 8001 |
|
|
login微服务的Dockerfile文件内容如下: |
|
|
login微服务的Dockerfile文件内容如下: |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /login.jar |
|
|
ADD ./target/*.jar /login.jar |
|
@ -437,7 +438,7 @@ EXPOSE 8000 |
|
|
provider_one微服务的Dockerfile文件内容如下: |
|
|
provider_one微服务的Dockerfile文件内容如下: |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /provider_one.jar |
|
|
ADD ./target/*.jar /provider_one.jar |
|
@ -448,7 +449,7 @@ EXPOSE 8666 |
|
|
provider_two微服务的Dockerfile文件内容如下: |
|
|
provider_two微服务的Dockerfile文件内容如下: |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /provider_two.jar |
|
|
ADD ./target/*.jar /provider_two.jar |
|
@ -459,7 +460,7 @@ EXPOSE 8667 |
|
|
provider_three微服务的Dockerfile文件内容如下: |
|
|
provider_three微服务的Dockerfile文件内容如下: |
|
|
|
|
|
|
|
|
```dockerfile |
|
|
```dockerfile |
|
|
FROM java:8 |
|
|
|
|
|
|
|
|
FROM openjdk:8 |
|
|
MAINTAINER ningzhicheng |
|
|
MAINTAINER ningzhicheng |
|
|
VOLUME /tmp |
|
|
VOLUME /tmp |
|
|
ADD ./target/*.jar /provider_three.jar |
|
|
ADD ./target/*.jar /provider_three.jar |
|
|