Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Feature request: link this repository to dockerhub

Đang mở
#645 2 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Xem xét Dockerfile và Dockerfile.alpine, sau đó kiểm tra các quy tắc build Docker Hub được đề xuất cho các thẻ phiên bản. Xác nhận rằng repository có thể được liên kết với tổ chức Docker Hub được yêu cầu và cả hai Dockerfile đều tự động build từ các thẻ mới có tiền tố v; hoàn tất có nghĩa là các image chính thức có sẵn cho những thẻ đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Until today, I have been using any of the many github-pages images out there. Today however, I encountered a bug in the latest versions, and I was trying to find where it came from. The bug is still there (something with an {% else %} not being recognised), and already reported, but while looking I also stumbled on this pages-gem repository, and saw the Dockerfile in there. This means there is an official docker image I can use. But it seems this repository is not yet linked to a dockerhub organisation. Would it be possible to link a dockerhub "github" organisation to this repository, so we could always have an up-to-date docker image on dockerhub?

Right now, I have forked this repository, to try and see if it was possible to use the repository as is in dockerhub. And yes, it takes only a few minutes to set up, but once it's there, it's free, needs no maintenance, and will automatically build a new image based on the latest tag, starting with the next tag you'll add to this repository. The setup I use:

Source repository: phpqa/pages-gem
Build rule 1:
  Source type: tag
  Source: /^(v[0-9.]+)$/
  Docker Tag: {\1}
  Dockerfile location: Dockerfile
  Build Context (only available on edit): /
  Autobuild: true
  Build caching: true
Build rule 2:
  Source type: tag
  Source: /^(v[0-9.]+)$/
  Docker Tag: {\1}-alpine
  Dockerfile location: Dockerfile.alpine
  Build Context (only available on edit): /
  Autobuild: true
  Build caching: true

This will build a docker image every time a new tag is added to the github repository. You can see the example at https://hub.docker.com/r/phpqa/github-pages-gem based on https://github.com/phpqa/pages-gem/releases/tag/v199

I use it with the following docker-compose.yml file, that will serve your site with a docker-compose up -d to 0.0.0.0:4000 (on a Mac, as there is a $PWD in there):

version: '3.7'

volumes:

    website:
        driver: local
        driver_opts:
            o: bind
            type: none
            device: $PWD/

services:
    jekyll:
        image: phpqa/github-pages-gem:v199
        command: jekyll serve -H 0.0.0.0 -P 4000 --watch --force_polling --verbose
        ports:
            - target: 4000
              published: 4000
              protocol: tcp
              mode: host
        volumes:
            - type: volume
              source: website
              target: /src/site
              volume:
                  nocopy: true

You could also add some build hooks to also add a latest tag, but that would only be an improvement.

Ngôn ngữ chính
Ruby
Star
1.9k
Fork
361
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/pages-gem

Tất cả issue của github/pages-gem

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.