Skip to content

Commit

Permalink
feat: 调整wait指令的加载方式
Browse files Browse the repository at this point in the history
  • Loading branch information
eryajf committed Apr 5, 2024
1 parent 8ec8e44 commit b386654
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file removed wait
Binary file not shown.

0 comments on commit b386654

Please sign in to comment.