This commit is contained in:
parent
2059b1d77c
commit
a933a35bcd
@ -1,4 +1,4 @@
|
||||
name: pigallery2
|
||||
name: wx_post
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
||||
on: [push]
|
||||
|
||||
@ -6,7 +6,7 @@ on: [push]
|
||||
jobs:
|
||||
|
||||
# 作业1名称
|
||||
pigallery2-Gitea-Actions:
|
||||
wx_post-Gitea-Actions:
|
||||
# 指定的运行器环境
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@ -18,8 +18,6 @@ jobs:
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: 'maven'
|
||||
cache-dependency-path: '**/pom.xml'
|
||||
# maven缓存,不加的话每次都会去重新拉取,会影响速度
|
||||
- name: Dependies Cache
|
||||
uses: actions/cache@v2
|
||||
@ -41,9 +39,9 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile.build
|
||||
file: ./dockerfile
|
||||
push: true
|
||||
tags: k2.xuthus83.cn:6001/pigallery2:latest
|
||||
tags: k2.xuthus83.cn:6001/wx_post:latest
|
||||
# - name: Build the Docker image
|
||||
# run:
|
||||
# | # 使用 上一步写的 Dockerfile 构建镜像并发布到私有仓库; 发布完成可以去 https://github.com/MrGaoGang?tab=packages 查看
|
||||
|
14
dockerfile
Normal file
14
dockerfile
Normal file
@ -0,0 +1,14 @@
|
||||
#penjdk:8-jre 为基础镜像,来构建此镜像,可以理解为运行的需要基础环境
|
||||
FROM openjdk:8-jre
|
||||
#WORKDIR指令用于指定容器的一个目录, 容器启动时执行的命令会在该目录下执行。
|
||||
WORKDIR /opt/docker/images/metabase/
|
||||
#将当前metabase.jar 复制到容器根目录下
|
||||
ADD metabase.jar metabase.jar
|
||||
#将依赖包 复制到容器根目录/libs下,metabase.jar已不再需要添加其它jar包
|
||||
#ADD libs /libs
|
||||
#暴露容器端口为3000 Docker镜像告知Docker宿主机应用监听了3000端口
|
||||
EXPOSE 3000
|
||||
#容器启动时执行的命令
|
||||
CMD java -jar metabase.jar
|
||||
|
||||
//docker build // . 表示当前目录 -f 参数指定Dockerfile文件 -t 表示 制作的镜像:tag docker build -f DockerFile -t test/metabase:1.0.0 .
|
Loading…
Reference in New Issue
Block a user