Skip to content

Commit

Permalink
docker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MXWXZ committed May 29, 2024
1 parent ae0267b commit 02a890c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,25 +133,15 @@ jobs:
- run: |
cd release
tar xzvf skynet-linux-x86_64.tar.gz
cd -
- name: Build and push x86_64
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- run: |
cd release
rm -rf skynet
mv skynet amd64
tar xzvf skynet-linux-aarch64.tar.gz
mv skynet arm64
cd -
- name: Build and push aarch64
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM ubuntu:latest
ARG TARGETARCH

RUN useradd -s /usr/sbin/nologin -r -c "Skynet User" skynet
COPY --chown=skynet:skynet release/skynet /app
COPY --chown=skynet:skynet release/$TARGETARCH /app

WORKDIR /app
USER skynet
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Security is considered as **TOP** priority in Skynet, we will not consider featu

### Run in docker

1. Copy `docker-compose.yml` and `conf.yml` to your folder.
2. `mkdir plugin` and `mkdir -p assets/_plugin`, then add your plugins.
3. `touch data.db` or copy your existing database.
4. `docker-compose up`
5. Visit `localhost:8080`.

### Run natively

**We do not recommend this method, use at your own risk!**
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
skynet:
build: .
image: imwxz/skynet
restart: always
depends_on:
- redis
Expand Down

0 comments on commit 02a890c

Please sign in to comment.