- Notifications
You must be signed in to change notification settings - Fork 78
Added workflow to build final working docker image and push it to ghcr (x86_64 only)#21
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
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Build and Push Docker Image | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - '*' | ||
| workflow_dispatch: | ||
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: ${{ github.repository }} | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| file: ./Dockerfile.x86_image | ||
| push: true | ||
| platforms: linux/amd64 | ||
| tags: | | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ${{ github.ref == 'refs/heads/main' && format('{0}/{1}:latest', env.REGISTRY, env.IMAGE_NAME) || '' }} | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM debian:trixie-slim AS builder | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| RUN apt-get update && apt-get install -y \ | ||
| build-essential cmake llvm unzip curl \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| WORKDIR /app | ||
| RUN curl -o android-ndk-r23b-linux.zip https://dl.google.com/android/repository/android-ndk-r23b-linux.zip \ | ||
| && unzip -q -d ~ android-ndk-r23b-linux.zip | ||
| COPY ./ ./ | ||
| RUN mkdir build/ && cd build && cmake .. && make | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| FROM debian:stable-slim | ||
| ENV args="" | ||
| COPY --from=builder /app/rootfs /app/rootfs | ||
| COPY --from=builder /app/wrapper /app/wrapper | ||
| WORKDIR /app | ||
| CMD ["sh", "-c", "/app/wrapper $args"] | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| EXPOSE 10020 20020 30020 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -14,6 +14,27 @@ Installation methods: | ||
| ### Docker | ||
| Available complete image for x86_64 arch. | ||
| 1. First login: | ||
| ``` | ||
| docker run -it \ | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| -v ./data:/app/rootfs/data \ | ||
| -e args='-L username:password -H 0.0.0.0' \ | ||
| ghcr.io/WorldObservationLog/wrapper | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ``` | ||
| 2. Then run: | ||
| ``` | ||
| docker run \ | ||
| -v ./data:/app/rootfs/data \ | ||
| -p 10020:10020 -p 20020:20020 -p 30020:30020 \ | ||
| -e args="-H 0.0.0.0" \ | ||
| ghcr.io/WorldObservationLog/wrapper | ||
tikhonp marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| ``` | ||
| ### Docker legacy | ||
| Available for x86_64 and arm64. Need to download prebuilt version from releases or actions. | ||
| 1. Build image: | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.