Skip to content

Commit

Permalink
add build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Nov 30, 2024
1 parent 99dc0ec commit 73c8636
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-deps

on:
workflow_dispatch:
schedule:
- cron: '0 6 */6 * *'
push:
branches:
- "master"
paths:
- ".github/workflows/build-deps.yml"
- "deps/Dockerfile"

jobs:
build-deps:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push deps file
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:deps"
file: Dockerfile
push: true
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm, linux/ppc64le, linux/riscv64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-yarn-dev:deps
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- "deps/Dockerfile"

jobs:
build-deps:
build:
runs-on: ubuntu-latest
steps:
-
Expand All @@ -40,4 +40,4 @@ jobs:
file: Dockerfile
push: true
platforms: linux/amd64, linux/arm64, linux/s390x, linux/arm, linux/ppc64le, linux/riscv64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-yarn-dev:deps
tags: ${{ secrets.DOCKERHUB_USERNAME }}/docker-yarn-dev
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ LABEL maintainer="M0nius <[email protected]>" \
org.opencontainers.image.version="1.0.0" \
org.opencontainers.image.url="https://hub.docker.com/r/monius/docker-yarn-dev" \
org.opencontainers.image.source="https://github.com/Mon-ius/Docker-Yarn-Dev" \
org.opencontainers.image.base.name="docker.io/monius/docker-yarn-dev"
org.opencontainers.image.base.name="docker.io/monius/docker-yarn-dev"

COPY entrypoint.sh /run/entrypoint.sh
ENTRYPOINT ["/run/entrypoint.sh"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@
Multi-platform: `linux/amd64`, `linux/arm64`, `linux/arm`, `linux/ppc64le`, `linux/s390x` and `linux/riscv64`;

> [!TIP]
> - To use customized `port`, set `-e DEV_PORT=$DEV_PORT`.
> - To use Encryption with `user` and `passwd`, set `DEV_SERVER=$DEV_SERVER` and `-e DEV_AUTH=$DEV_AUTH`.
```sh
docker run --restart=always -itd \
--name yarn_dev \
-e DEV_SERVER=$DEV_SERVER -e DEV_AUTH=$DEV_AUTH \
-e DEV_PORT=443 \
monius/docker-yarn-dev
```
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,8 @@ $AUTH_PART
}
EOF

if [ ! -e "/usr/bin/dev-cli" ]; then
echo "sing-box -c /etc/sing-box/config.json run" > /usr/bin/dev-cli && chmod +x /usr/bin/dev-cli
fi

exec "$@"

0 comments on commit 73c8636

Please sign in to comment.