Skip to content

Commit

Permalink
调整阿里云镜像的命名空间,找回eryajf
Browse files Browse the repository at this point in the history
  • Loading branch information
eryajf committed Apr 7, 2024
1 parent 2c15716 commit 792ec90
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 65 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
username: eryajf
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
Expand All @@ -62,15 +62,15 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
# 给清单打上多个标签
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/go-ldap-admin:latest
${{ secrets.DOCKERHUB_USERNAME }}/go-ldap-admin:${{ steps.date.outputs.today }}
eryajf/go-ldap-admin:latest
eryajf/go-ldap-admin:${{ steps.date.outputs.today }}
# 镜像推送到 阿里云仓库
- name: Login to the Ali Registry
uses: docker/login-action@v2
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIHUB_USERNAME }}
username: eryajf
password: ${{ secrets.ALIHUB_TOKEN }}

- name: Build and push to Ali
Expand All @@ -80,5 +80,5 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: |
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIHUB_USERNAME }}/go-ldap-admin:${{ env.GITHUB_REF_NAME }}
registry.cn-hangzhou.aliyuncs.com/${{ secrets.ALIHUB_USERNAME }}/go-ldap-admin:latest
registry.cn-hangzhou.aliyuncs.com/eryajf/go-ldap-admin:${{ env.GITHUB_REF_NAME }}
registry.cn-hangzhou.aliyuncs.com/eryajf/go-ldap-admin:latest
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/golang:1.18.10-alpine3.17 AS builder
FROM registry.cn-hangzhou.aliyuncs.com/eryajf/golang:1.18.10-alpine3.17 AS builder

WORKDIR /app

Expand All @@ -10,15 +10,15 @@ RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories

ADD . .

COPY --from=registry.cn-hangzhou.aliyuncs.com/ali_eryajf/docker-compose-wait /wait .
COPY --from=registry.cn-hangzhou.aliyuncs.com/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 && upx -9 wait

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

LABEL maintainer [email protected]

Expand Down
2 changes: 1 addition & 1 deletion docs/custom-openldap-dockerfile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.cn-hangzhou.aliyuncs.com/ali_eryajf/openldap:1.4.0
FROM registry.cn-hangzhou.aliyuncs.com/eryajf/openldap:1.4.0

LABEL maintainer https://github.com/eryajf

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-openldap-dockerfile/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
docker build --no-cache . -t registry.cn-hangzhou.aliyuncs.com/ali_eryajf/openldap:1.4.1
docker push registry.cn-hangzhou.aliyuncs.com/ali_eryajf/openldap:1.4.1
docker build --no-cache . -t registry.cn-hangzhou.aliyuncs.com/eryajf/openldap:1.4.1
docker push registry.cn-hangzhou.aliyuncs.com/eryajf/openldap:1.4.1
69 changes: 16 additions & 53 deletions docs/docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# 更多部署方式详见:http://ldapdoc.eryajf.net/pages/f081dc/
version: '3'

networks:
go-ldap-admin:
driver: bridge

services:
mysql:
image: registry.cn-hangzhou.aliyuncs.com/ali_eryajf/mysql:8.3
container_name: go-ldap-admin-mysql # 指定容器名称,如果不设置此参数,则由系统自动生成
hostname: go-ldap-admin-mysql
restart: always # 设置容器自启模式
ports:
- '3307:3306'
go-ldap-admin:
image: registry.cn-hangzhou.aliyuncs.com/eryajf/go-ldap-admin
container_name: go-ldap-admin
hostname: go-ldap-admin
restart: always
environment:
TZ: Asia/Shanghai # 设置容器时区与宿主机保持一致
MYSQL_ROOT_PASSWORD: 123456 # 设置root密码
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: go_ldap_admin
WAIT_HOSTS: openldap:389
DB_DRIVER: sqlite3
ports:
- 8888:8888
volumes:
- ./data/mysql:/var/lib/mysql # 映射数据库保存目录到宿主机,防止数据丢失
- ./data/go-ldap-admin:/app/data
depends_on:
- openldap
links:
- openldap:go-ldap-admin-openldap
networks:
- go-ldap-admin

openldap:
image: registry.cn-hangzhou.aliyuncs.com/ali_eryajf/openldap:1.4.1
image: registry.cn-hangzhou.aliyuncs.com/eryajf/openldap:1.4.1
container_name: go-ldap-admin-openldap
hostname: go-ldap-admin-openldap
restart: always
Expand All @@ -40,43 +43,3 @@ services:
- 388:389
networks:
- go-ldap-admin

phpldapadmin:
image: registry.cn-hangzhou.aliyuncs.com/ali_eryajf/phpldapadmin:0.9.0
container_name: go-ldap-admin-phpldapadmin
hostname: go-ldap-admin-phpldapadmin
restart: always
environment:
TZ: Asia/Shanghai # 设置容器时区与宿主机保持一致
PHPLDAPADMIN_HTTPS: "false" # 是否使用https
PHPLDAPADMIN_LDAP_HOSTS: go-ldap-admin-openldap # 指定LDAP容器名称
ports:
- 8091:80
volumes:
- ./data/phpadmin:/var/www/phpldapadmin
depends_on:
- openldap
links:
- openldap:go-ldap-admin-openldap # ldap容器的 service_name:container_name
networks:
- go-ldap-admin

go-ldap-admin:
image: registry.cn-hangzhou.aliyuncs.com/ali_eryajf/go-ldap-admin
container_name: go-ldap-admin
hostname: go-ldap-admin
restart: always
environment:
WAIT_HOSTS: mysql:3306, openldap:389
ports:
- 8888:8888
volumes:
- ./data/go-ldap-admin:/app/data
depends_on:
- mysql
- openldap
links:
- mysql:go-ldap-admin-mysql # ldap容器的 service_name:container_name
- openldap:go-ldap-admin-openldap # ldap容器的 service_name:container_name
networks:
- go-ldap-admin

0 comments on commit 792ec90

Please sign in to comment.