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
|
FROM alpine:edge
|
||||||
|
|
||||||
ENV TZ="Asia/Shanghai"
|
|
||||||
|
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
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" && \
|
COPY ./script/entrypoint.sh /entrypoint.sh
|
||||||
apt update && apt install -y ca-certificates tzdata && \
|
RUN chmod +x /entrypoint.sh
|
||||||
update-ca-certificates && \
|
|
||||||
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
|
||||||
dpkg-reconfigure tzdata && \
|
|
||||||
chmod +x /entrypoint.sh
|
|
||||||
|
|
||||||
WORKDIR /dashboard
|
WORKDIR /dashboard
|
||||||
COPY dist/dashboard-${TARGETOS}-${TARGETARCH} ./app
|
COPY dist/dashboard-${TARGETOS}-${TARGETARCH} ./app
|
||||||
|
Loading…
Reference in New Issue
Block a user