Skip to content

Commit

Permalink
fix: docker image build script
Browse files Browse the repository at this point in the history
Signed-off-by: qwqcode <[email protected]>
  • Loading branch information
qwqcode committed Jan 17, 2023
1 parent e4ffc0b commit f89f87d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion BACKEND.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ $ git clone https://github.com/ArtalkJS/Artalk
$ cd Artalk

# 构建镜像
$ make docker-docker
$ make docker-build

# 发布镜像
$ make docker-push
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

> 🌌 Golang 自托管评论系统
[English](./README.en.md) / [官方文档](https://artalk.js.org) / [最新后端](https://github.com/ArtalkJS/Artalk/releases) / [Artalk](https://github.com/ArtalkJS/Artalk)
[English](./README.en.md) / [官方文档](https://artalk.js.org) / [最新版本](https://github.com/ArtalkJS/Artalk/releases)

---

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Artalk Documentation

> the documentation of Artalk
> The Documentation of Artalk
## Build

Expand Down
8 changes: 3 additions & 5 deletions scripts/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

set -e

IMAGE_NAME="artalk"
REPO_NAME="artalk/artalk"

IMAGE_NAME="artalk/artalk"
VERSION=$(git describe --tags --abbrev=0)

if [[ $* == *--push* ]]
then
# tag and push image
for tag in {${VERSION},latest}; do
docker image tag ${IMAGE_NAME} ${REPO_NAME}:${tag}
docker push ${REPO_NAME}:${tag}
docker image tag ${IMAGE_NAME} ${IMAGE_NAME}:${tag}
docker push ${IMAGE_NAME}:${tag}
done
else
# build
Expand Down

0 comments on commit f89f87d

Please sign in to comment.