Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add stage caching to Dockerfile #408

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

Jungley8
Copy link
Contributor

No description provided.

@songquanpeng
Copy link
Owner

测试 Okay 吗?

@ii-jj
Copy link

ii-jj commented Aug 13, 2023

测试 Okay 吗?

Actions 没测过,本地测试 是可以的,主要是给开发环境用的。

@songquanpeng
Copy link
Owner

缓存可以正常生效吗?

@songquanpeng
Copy link
Owner

另外问一下开发环境为什么要构建镜像?纯好奇

@Jungley8
Copy link
Contributor Author

另外问一下开发环境为什么要构建镜像?纯好奇

缓存是生效的。

因为不太熟悉 go .…… 只能跑出 docker 服务来测

@ckt1031
Copy link
Contributor

ckt1031 commented Aug 13, 2023

那么为什么不添加package-lock.json然后npm ci, 更快省时间更安全

@songquanpeng
Copy link
Owner

因为我这里用了淘宝镜像,package-lock.json 里也是这样,GitHub Actions 就会使用淘宝镜像。

@ii-jj
Copy link

ii-jj commented Aug 13, 2023

那么为什么不添加package-lock.json然后npm ci, 更快省时间更安全

我也很疑惑 这个文件 居然没提交上来。 所以就先这样了

@ckt1031
Copy link
Contributor

ckt1031 commented Aug 13, 2023

另外问一下开发环境为什么要构建镜像?纯好奇

缓存是生效的。

因为不太熟悉 go .…… 只能跑出 docker 服务来测

cd web
npm i
npm run build

cd ..

這個指令: go run main.go <-- 可以直接调试

@Jungley8
Copy link
Contributor Author

另外问一下开发环境为什么要构建镜像?纯好奇

缓存是生效的。
因为不太熟悉 go .…… 只能跑出 docker 服务来测

cd web npm i npm run build

cd ..

這個指令: go run main.go <-- 可以直接调试

3q , 后期可以顺便补到 README

@songquanpeng songquanpeng merged commit e4bacc4 into songquanpeng:main Aug 13, 2023
@songquanpeng
Copy link
Owner

GitHub Actions 里打包好像用不到吧?我还不太懂 GitHub Actions 里如何复用缓存

@Jungley8 Jungley8 deleted the ci/docker-cache branch August 13, 2023 15:04
@Jungley8
Copy link
Contributor Author

GitHub Actions 里打包好像用不到吧?我还不太懂 GitHub Actions 里如何复用缓存

Actions 是分布式服务,机器太多了,对actions 作用不大,单台缓存,容易看到效果。

@songquanpeng
Copy link
Owner

我记得缓存是共享的好像

ChongzhengZhao pushed a commit to ChongzhengZhao/llm-one-api that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants