Skip to main content

CÀI ĐẶT PASSCORE LÊN PORTAINER/DOCKER


Dưới đây là tóm tắt toàn bộ quá trình thực hiện cài đặt Unosquare PassCore lên Portainer/Docker:


1. Kiểm tra môi trường hệ thống

  • Kiểm tra hệ thống và xác nhận Docker Engine cùng Portainer CE đã được cài đặt và đang hoạt động (Portainer chạy ở cổng 9000 / 9443).

2. Phân tích & Xử lý mã nguồn PassCore

  • Đặc điểm PassCore: Unosquare PassCore là công cụ web (.NET 6.0) cho phép người dùng tự đổi/reset mật khẩu Active Directory/LDAP. Dự án không có image chính thức sẵn trên Docker Hub nên cần build từ mã nguồn GitHub.
  • Tải mã nguồn: Clone repository chính thức từ https://github.com/unosquare/passcore.git.

3. Tối ưu & Sửa lỗi Dockerfile

Trong quá trình build image, tôi đã phát hiện và xử lý 3 lỗi biên dịch:

  1. Lỗi copy thư mục gốc: Sửa câu lệnh COPY --from=node_base . . gây lỗi xung đột hệ thống tệp trong Docker BuildKit mới.
  2. Lỗi repository Debian (404 Not Found): Chuyển base image từ Debian Bullseye sang Ubuntu 22.04 Jammy (dotnet/sdk:6.0-jammy & aspnet:6.0-jammy) để đảm bảo các gói phụ thuộc được tải ổn định.
  3. Lỗi thiếu môi trường biên dịch Native Node-gyp: Bổ sung python3, make, g++ và nodejs 18 vào giai đoạn build để biên dịch thành công module C++ (deasync) của frontend.

➜ Kết quả: Build thành công Docker Image passcore:latest (dung lượng ~315MB).


4. Đóng gói & Khởi chạy Container

  • Tạo thư mục làm việc /home/systemadmin/passcore.
  • Tạo file cấu hình 

docker-compose.yml chứa đầy đủ các biến môi trường cấu hình kết nối LDAP / Active Directory.

  • Khởi chạy thử nghiệm stack. Kết quả: Container passcore hoạt động bình thường và phản hồi HTTP 200 OK tại đường dẫn http://localhost:8080.

5. Tạo tài liệu hướng dẫn cài đặt trên Portainer UI

  • Đã biên soạn file 

README.md chứa hướng dẫn chi tiết từng bước:

    • Cách tạo Stack mới trên giao diện web Portainer.
    • Cấu hình file docker-compose.yml.
    • Giải thích các tham số kết nối Active Directory (IP Domain Controller, Bind Username, Bind Password, Base DN...).

 




Comments

Popular posts from this blog

[RAID] SWITCH FROM AHCI TO RAID WITH INTEL C600 CONTROLLER

I personally have used other ways to do this. Manipulating some registry settings in combination with a safe boot before booting normally does the trick as well. This works with both SATA SSD and M.2 NVMe drives and it enables relatively fast switching between back and forth between AHCI and RAID. I have described this method below.  I have also tried the same process used to switch from RAD to AHCI and that works as well. Switch to safe boot Reboot into BIOS Change from AHCI to RAID in the BIOS Boot into safe mode Turn off safe mode and reboot normally again Nothing else and that also did the trick, just like with moving from RAID to AHCI.  So the link above and my step by step below is here for completeness. You have options in case one of them doesn’t work! Step by step AHCI to RAID registry method This procedure I describe below works on Windows 10 1803/1809 and has been tested on Dell Latitude E6220 an XPS 13 9360. Editing the registry is...

LỖI KHÔNG TẠO PIN CODE ĐỂ DÙNG HELLO LOGIN

Lỗi  0x801C044D khi khởi tạo PIN code  Nguyên nhân:  Authorization token does not contain device ID Tham khảo:  https://docs.microsoft.com/en-us/windows/security/identity-protection/hello-for-business/hello-errors-during-pin-creation Cách xử lý:  Unjoin the device from Azure AD and rejoin. Làm như sau: Vào Settings > Accounts > Access work or school Disconnect tất cả các tài khoản link với Azure (Cloud) Reboot lại máy

ĐỊNH NGHĨA MỚI VỀ VPN

Nhu cầu kết nối nhanh chóng, đơn giản mà lại an toàn làm "đẻ" ra các kỹ thuật VPN mới: VPN truyền thống : cần 1 VPN server để tiếp nhận connection từ endpoint. VPN hiện đại : Mạng riêng ảo phi tập trung Decentralized Private Network (DPN), ứng dụng công nghệ Block -chain Các branding: Deeper Network : thiết bị đầu tiên áp dụng công nghệ DPN Tailscale : dùng công nghệ Peer VPN (P2P)