mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
Improve: use alpine as dockerfile base image (#309)
* build: use alpine as base image * build: use alpine edge instead of latest
This commit is contained in:
parent
f59b31590e
commit
ac0103a1ee
19
Dockerfile
19
Dockerfile
@ -1,18 +1,17 @@
|
||||
FROM ubuntu:focal-20221130
|
||||
|
||||
ENV TZ="Asia/Shanghai"
|
||||
FROM alpine:edge
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY ./script/entrypoint.sh /entrypoint.sh
|
||||
RUN apk update && \
|
||||
apk upgrade --no-cache && \
|
||||
apk add --no-cache tzdata && \
|
||||
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||
echo 'Asia/Shanghai' >/etc/timezone && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
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
|
||||
COPY ./script/entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
WORKDIR /dashboard
|
||||
COPY dist/dashboard-${TARGETOS}-${TARGETARCH} ./app
|
||||
|
Loading…
Reference in New Issue
Block a user