mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
💚 fix dockerfile
This commit is contained in:
parent
66d3e83e99
commit
9419b02cd3
14
.github/workflows/dashboard.yml
vendored
14
.github/workflows/dashboard.yml
vendored
@ -33,22 +33,16 @@ jobs:
|
||||
dest: dist
|
||||
pkg: cmd/dashboard
|
||||
prefix: dashboard
|
||||
targets: linux/amd64,linux/arm64,linux/arm-7,linux/386,linux/s390x
|
||||
targets: linux/amd64,linux/arm64,linux/arm-7,linux/386,linux/s390x,linux/riscv64
|
||||
v: true
|
||||
x: false
|
||||
race: false
|
||||
ldflags: -s -w
|
||||
buildmode: default
|
||||
|
||||
- name: move dist
|
||||
- name: fix dist
|
||||
run: |
|
||||
mkdir -p target/linux/{arm,arm64,386,amd64,s390x}
|
||||
mkdir target/linux/arm/v7/
|
||||
mv dist/dashboard-linux-arm-7 target/linux/arm/v7/dashboard
|
||||
mv dist/dashboard-linux-arm64 target/linux/arm64/dashboard
|
||||
mv dist/dashboard-linux-386 target/linux/386/dashboard
|
||||
mv dist/dashboard-linux-amd64 target/linux/amd64/dashboard
|
||||
mv dist/dashboard-linux-s390x target/linux/s390x/dashboard
|
||||
cp dist/dashboard-linux-arm-7 dist/dashboard-linux-arm
|
||||
|
||||
- name: Log in to the GHCR
|
||||
uses: docker/login-action@master
|
||||
@ -86,7 +80,7 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm,linux/386,linux/s390x
|
||||
platforms: linux/amd64,linux/arm64,linux/arm,linux/386,linux/s390x,linux/riscv64
|
||||
push: true
|
||||
tags: |
|
||||
${{ steps.image-name.outputs.GHRC_IMAGE_NAME }}:${{ steps.extract_branch.outputs.tag }}
|
||||
|
18
Dockerfile
18
Dockerfile
@ -1,20 +1,22 @@
|
||||
FROM ubuntu:latest
|
||||
ARG TARGETARCH
|
||||
ARG TARGETOS
|
||||
|
||||
FROM $TARGETARCH/ubuntu:20.04
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ENV TZ="Asia/Shanghai"
|
||||
|
||||
COPY ./script/entrypoint.sh /entrypoint.sh
|
||||
|
||||
RUN export DEBIAN_FRONTEND="noninteractive" &&
|
||||
apt update && apt install -y ca-certificates tzdata &&
|
||||
update-ca-certificates &&
|
||||
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime &&
|
||||
dpkg-reconfigure tzdata &&
|
||||
RUN export DEBIAN_FRONTEND="noninteractive" && \
|
||||
apt update && apt install -y ca-certificates tzdata && \
|
||||
update-ca-certificates && \
|
||||
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||
dpkg-reconfigure tzdata && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /dashboard
|
||||
COPY ./resource ./resource
|
||||
COPY target/$TARGETPLATFORM/dashboard ./app
|
||||
COPY dist/dashboard-$TARGETOS-$TARGETARCH ./app
|
||||
|
||||
VOLUME ["/dashboard/data"]
|
||||
EXPOSE 80 5555
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo -e "nameserver 127.0.0.11\nnameserver 8.8.8.8\nnameserver 223.5.5.5\n" > /etc/resolv.conf
|
||||
echo -e "nameserver 127.0.0.11\nnameserver 8.8.4.4\nnameserver 223.5.5.5\n" > /etc/resolv.conf
|
||||
/dashboard/app
|
Loading…
Reference in New Issue
Block a user