Skip to content

Commit 679a4a0

Browse files
committed
chore: Update readme for ARM build steps
1 parent 434055a commit 679a4a0

File tree

3 files changed

+39
-17
lines changed

3 files changed

+39
-17
lines changed

Dockerfile.arm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:12-alpine as builder
2-
MAINTAINER wangxi <sunnywang@yunify.com>
2+
MAINTAINER sunnyw <sunnywang@yunify.com>
33

44
ENV SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass
55
ENV PATH=$PATH:/home/node_modules/.bin

README.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,50 @@
1414
```
1515
git clone https://github.com/openpitrix/dashboard.git
1616
cd dashboard
17-
yarn
17+
yarn
1818
yarn dev
1919
```
2020

21-
Or you can running dashboard in `docker`:
21+
## Docker
22+
23+
You can run dashboard in `docker`:
2224

2325
```
2426
docker pull openpitrix/dashboard
25-
docker run -d --name openpitrix-dashborad -p 8000:8000 openpitrix/dashboard
27+
docker run -d --rm --name openpitrix-dashborad -p 8000:8000 openpitrix/dashboard
28+
```
29+
30+
Then open your favorite browser: `http://localhost:8000`
31+
32+
## Build for ARM platform
33+
34+
We also support running `openpitrix/dashboard` in ARM platform using docker
35+
36+
See build steps in `Dockerfile.arm`
37+
38+
If you want try local build for ARM:
39+
40+
```
41+
make build-arm
42+
make run-arm
43+
```
44+
45+
Or running our official arm64 image from docker hub:
46+
47+
```
48+
docker pull openpitrix/dashboard:min-arm64
49+
docker run -d --rm --name openpitrix-dashborad-arm -p 8000:8000 openpitrix/dashboard:min-arm64
2650
```
27-
Then open your browser: `http://localhost:8000`
2851

2952
## Develop
53+
3054
```
31-
yarn
55+
yarn
3256
yarn dev
3357
```
3458

3559
We prefer `yarn` as our package manager, if you like `npm`:
60+
3661
```
3762
npm i
3863
npm run dev
@@ -41,26 +66,22 @@ npm run dev
4166
See [How to install requsites](./docs/install.md)
4267

4368
## Test
69+
4470
```
4571
yarn test
4672
```
4773

4874
## Build
4975

5076
For production build:
77+
5178
```
5279
yarn prod:build
5380
```
54-
Or using `npm`:
55-
```
56-
npm run prod:build
57-
```
58-
5981

6082
## Quick start
6183

62-
* [Deploy wordpress on QingCloud using openpitrix](./docs/quick-start.md)
63-
84+
- [Deploy wordpress on QingCloud using openpitrix](./docs/quick-start.md)
6485

6586
## License
6687

deploy-docker.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
REPO=openpitrix/dashboard
66
COMMIT=$(git rev-parse --short HEAD)
7+
TAG=${1:-latest}
78

8-
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
9+
cat ~/docker_pass.txt | docker login --username iwisunny --password-stdin
910

1011
echo "Pulling remote latest image to reuse docker cache"
1112
docker pull $REPO:latest
@@ -14,7 +15,7 @@ echo "Building docker image from git HEAD commit: $COMMIT"
1415
docker build --cache-from $REPO:latest -t $REPO:$COMMIT .
1516

1617
echo "Tag $REPO:$COMMIT as latest image"
17-
docker tag $REPO:$COMMIT $REPO:latest
18+
docker tag $REPO:$COMMIT $REPO:$TAG
1819

1920
echo "Push latest image to docker hub"
20-
docker push $REPO:latest
21+
docker push $REPO:$TAG

0 commit comments

Comments
 (0)