Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/docker.yml
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
Comment thread
tikhonp marked this conversation as resolved.
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
Comment thread
tikhonp marked this conversation as resolved.
${{ github.ref == 'refs/heads/main' && format('{0}/{1}:latest', env.REGISTRY, env.IMAGE_NAME) || '' }}
Comment thread
tikhonp marked this conversation as resolved.
19 changes: 19 additions & 0 deletions Dockerfile.x86_image
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM debian:trixie-slim AS builder
Comment thread
tikhonp marked this conversation as resolved.
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


Comment thread
tikhonp marked this conversation as resolved.
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"]
Comment thread
tikhonp marked this conversation as resolved.
EXPOSE 10020 20020 30020
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ Installation methods:

### Docker

Available complete image for x86_64 arch.

1. First login:
```
docker run -it \
Comment thread
tikhonp marked this conversation as resolved.
-v ./data:/app/rootfs/data \
-e args='-L username:password -H 0.0.0.0' \
ghcr.io/WorldObservationLog/wrapper
Comment thread
tikhonp marked this conversation as resolved.
```

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
Comment thread
tikhonp marked this conversation as resolved.
```

### Docker legacy

Available for x86_64 and arm64. Need to download prebuilt version from releases or actions.

1. Build image:
Expand Down
Loading