Skip to content

Commit b386654

Browse files
committed
feat: 调整wait指令的加载方式
1 parent 8ec8e44 commit b386654

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/golang:1.18.10-alpine3.17 AS
22

33
WORKDIR /app
44

5+
ENV GOPROXY https://goproxy.io
6+
57
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories \
68
&& apk upgrade && apk add --no-cache --virtual .build-deps \
79
ca-certificates gcc g++ curl upx
810

911
ADD . .
1012

13+
COPY --from=registry.cn-hangzhou.aliyuncs.com/ali_eryajf/docker-compose-wait /wait .
14+
1115
RUN release_url=$(curl -s https://api.github.com/repos/eryajf/go-ldap-admin-ui/releases/latest | grep "browser_download_url" | grep -v 'dist.zip.md5' | cut -d '"' -f 4); wget $release_url && unzip dist.zip && rm dist.zip && mv dist public/static
1216

1317
RUN sed -i 's@localhost:389@openldap:389@g' /app/config.yml \
14-
&& sed -i 's@host: localhost@host: mysql@g' /app/config.yml && go build -o go-ldap-admin . && upx -9 go-ldap-admin
18+
&& sed -i 's@host: localhost@host: mysql@g' /app/config.yml && go build -o go-ldap-admin . && upx -9 go-ldap-admin && upx -9 wait
1519

1620
### build final image
1721
FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/alpine:3.19

wait

-390 KB
Binary file not shown.

0 commit comments

Comments
 (0)