feat: 调整wait指令的加载方式
This commit is contained in:
parent
8ec8e44617
commit
b386654b52
|
@ -2,16 +2,20 @@ FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/golang:1.18.10-alpine3.17 AS
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
ENV GOPROXY https://goproxy.io
|
||||
|
||||
RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories \
|
||||
&& apk upgrade && apk add --no-cache --virtual .build-deps \
|
||||
ca-certificates gcc g++ curl upx
|
||||
|
||||
ADD . .
|
||||
|
||||
COPY --from=registry.cn-hangzhou.aliyuncs.com/ali_eryajf/docker-compose-wait /wait .
|
||||
|
||||
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
|
||||
|
||||
RUN sed -i 's@localhost:389@openldap:389@g' /app/config.yml \
|
||||
&& sed -i 's@host: localhost@host: mysql@g' /app/config.yml && go build -o go-ldap-admin . && upx -9 go-ldap-admin
|
||||
&& 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
|
||||
|
||||
### build final image
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/alpine:3.19
|
||||
|
|
Loading…
Reference in New Issue