Skip to content

Commit 846bb7e

Browse files
authored
Container registry- and engine-generic documentation (#213)
1 parent 836614b commit 846bb7e

17 files changed

+317
-67
lines changed

.gitattributes

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Dockerfile.template linguist-language=Dockerfile
1+
* text=auto eol=lf
2+
3+
Dockerfile.template linguist-language=Dockerfile

.github/workflows/ci.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- name: Extract current version
2121
id: version-step
22-
run: echo "version=$(grep -oP '^ARG YOURLS_VERSION=\"\K[^\"]+' Dockerfile.template)" >> $GITHUB_OUTPUT
22+
run: echo "version=$(grep -oP '^ARG YOURLS_VERSION=\"\K[^\"]+' images/yourls/Dockerfile.template)" >> $GITHUB_OUTPUT
2323

2424
files:
2525
name: Files
@@ -28,22 +28,22 @@ jobs:
2828
- uses: actions/checkout@v3
2929

3030
- name: Generate variants
31-
run: ./bin/generate-variants.sh dist/
31+
run: ./images/yourls/bin/generate-variants.sh dist/
3232

3333
- name: Prepare scripts
3434
run: |
35-
mkdir dist/bin
36-
cp ./bin/* dist/bin
37-
rm ./dist/bin/generate-variants.sh
35+
mkdir ./images/yourls/dist/bin
36+
cp ./images/yourls/bin/* ./images/yourls/dist/bin
37+
rm ./images/yourls/dist/bin/generate-variants.sh
3838
3939
- name: Copy version
40-
run: grep -oP '^ARG YOURLS_VERSION="\K[^"]+' Dockerfile.template > ./dist/yourls_version
40+
run: grep -oP '^ARG YOURLS_VERSION="\K[^"]+' ./images/yourls/Dockerfile.template > ./images/yourls/dist/yourls_version
4141

4242
- name: Save files
4343
uses: actions/upload-artifact@v3
4444
with:
4545
name: context-files
46-
path: dist
46+
path: ./images/yourls/dist
4747

4848
build:
4949
name: Build
@@ -60,7 +60,7 @@ jobs:
6060
with:
6161
name: context-files
6262

63-
- run: chmod +x ./*/docker-entrypoint.sh
63+
- run: chmod +x ./*/container-entrypoint.sh
6464

6565
- name: Set up Docker Buildx
6666
uses: docker/setup-buildx-action@v2

.github/workflows/hub.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://docs.github.com/actions
22

3-
name: Hub
3+
name: Docker Hub
44

55
on:
66
workflow_dispatch:

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
name: Code Base
1616
uses: YOURLS/.github/.github/workflows/lint.yml@main
1717
with:
18-
exclude: Dockerfile.template
18+
exclude: images/yourls/Dockerfile.template

.github/workflows/release.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
name: context-files
3434

35-
- run: chmod +x bin/* && chmod +x ./*/docker-entrypoint.sh
35+
- run: chmod +x bin/* && chmod +x ./*/container-entrypoint.sh
3636

3737
- name: Deploy
3838
uses: peaceiris/[email protected]
@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
name: context-files
9191

92-
- run: chmod +x ./*/docker-entrypoint.sh
92+
- run: chmod +x ./*/container-entrypoint.sh
9393

9494
- name: Install Cosign
9595
uses: sigstore/[email protected]
@@ -149,6 +149,17 @@ jobs:
149149
org.opencontainers.image.created=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
150150
org.opencontainers.image.revision=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
151151
org.opencontainers.image.source=https://github.com/${{ secrets.image }}
152+
org.opencontainers.image.version=${{ inputs.version }}
153+
org.opencontainers.image.title=YOURLS
154+
org.opencontainers.image.description=Your Own URL Shortener
155+
org.opencontainers.image.url=https://yourls.org
156+
org.opencontainers.image.documentation=https://yourls.org
157+
org.opencontainers.image.vendor=YOURLS Org
158+
org.opencontainers.image.authors=YOURLS
159+
org.opencontainers.image.licenses=MIT
160+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/YOURLS/images/main/images/yourls/README.md
161+
io.artifacthub.package.alternative-locations=docker.io/library/yourls
162+
io.artifacthub.package.logo-url=https://yourls.org/images/yourls-logo.svg
152163
tags: ${{ steps.meta.outputs.tags }}
153164
cache-from: type=gha,scope=${{ matrix.variant }}
154165
# cache-to: type=gha,scope=${{ matrix.variant }},mode=max

README.md

+10-35
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,19 @@
1-
# YOURLS using Docker
1+
# YOURLS using Containers
22

3-
> Official [Docker](https://docker.com) images for [YOURLS](https://yourls.org).
3+
> Official [container](https://opencontainers.org) images for [YOURLS](https://yourls.org).
44
5-
[![Build Status](https://github.com/YOURLS/docker/workflows/Docker%20CI/badge.svg)](https://github.com/YOURLS/docker/actions)
6-
[![Docker Hub Pulls](https://img.shields.io/docker/pulls/_/yourls.svg)](https://hub.docker.com/_/yourls)
7-
[![Docker Hub Stars](https://img.shields.io/docker/stars/_/yourls.svg)](https://hub.docker.com/_/yourls)
5+
[![Build Status](https://github.com/YOURLS/images/actions/workflows/ci.yml/badge.svg)](https://github.com/YOURLS/images/actions/workflows/ci.yml)
6+
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/yourls)](https://artifacthub.io/packages/search?repo=yourls-images)
87
[![Listed in Awesome YOURLS](https://img.shields.io/badge/Awesome-YOURLS-C5A3BE)](https://github.com/YOURLS/awesome-yourls)
98

109
## About
1110

12-
This is the Git repository of the [Docker "Official Image"](https://docs.docker.com/docker-hub/official_repos/) for [YOURLS](https://hub.docker.com/_/yourls).
11+
This is the Git repository of the official container images for YOURLS.
1312

13+
| Image | Docker Hub | Version |
14+
|:-----:|:----------:|:-------:|
15+
| `ghcr.io/yourls/yourls` | `docker.io/library/yourls` (`yourls`) | [![Image Version](https://img.shields.io/docker/v/_/yourls?label=yourls&sort=semver)](https://artifacthub.io/packages/container/yourls-images/yourls) |
1416

15-
## Usage
17+
## License
1618

17-
See [the Docker Hub page](https://hub.docker.com/_/yourls) for the full readme on how to use this Docker image and for information regarding contributing and issues.
18-
19-
20-
## FAQ
21-
22-
### How to change README page visible on Docker Hub?
23-
24-
The [full description from Docker Hub](https://hub.docker.com/_/yourls) is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/yourls](https://github.com/docker-library/docs/tree/master/yourls).
25-
26-
### See a change merged here that doesn't show up on Docker Hub yet?
27-
28-
Check [the "library/yourls" manifest file in the docker-library/official-images repository](https://github.com/docker-library/official-images/blob/master/library/yourls), especially [PRs with the "library/yourls" label on that repository](https://github.com/docker-library/official-images/labels/library%2Fyourls).
29-
30-
For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md).
31-
32-
### Is there an alternative Container Registry?
33-
34-
Yes, YOURLS images are also [hosted on the GitHub Container Registry](https://github.com/YOURLS/YOURLS/pkgs/container/yourls).
35-
36-
---
37-
38-
| Build | Status | Badges | (per-arch) |
39-
|:-:|:-:|:-:|:-:|
40-
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/yourls.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/yourls/) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/yourls.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/yourls/) | [![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/yourls.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/yourls/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/yourls.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/yourls/) |
41-
| [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/yourls.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/yourls/) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/yourls.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/yourls/) | [![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/yourls.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/yourls/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/yourls.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/yourls/) |
42-
| [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/yourls.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/yourls/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/yourls.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/yourls/) |
43-
44-
<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->
19+
This project is licensed under [MIT License](LICENSE).

Dockerfile.template images/yourls/Dockerfile.template

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL org.opencontainers.image.documentation="https://yourls.org/"
77
LABEL org.opencontainers.image.vendor="YOURLS Org"
88
LABEL org.opencontainers.image.authors="YOURLS"
99
LABEL org.opencontainers.image.licenses="MIT"
10-
LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/YOURLS/YOURLS/master/README.md"
10+
LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/YOURLS/images/main/images/yourls/README.md"
1111

1212
# install the PHP extensions we need
1313
RUN set -eux; \
@@ -44,8 +44,8 @@ RUN set -eux; \
4444
rm yourls.tar.gz; \
4545
chown -R www-data:www-data /usr/src/yourls
4646

47-
COPY --chown=www-data:www-data config-docker.php /usr/src/yourls/user/
48-
COPY docker-entrypoint.sh /usr/local/bin/
47+
COPY --chown=www-data:www-data config-container.php /usr/src/yourls/user/
48+
COPY container-entrypoint.sh /usr/local/bin/
4949
%%VARIANT_FILES%%
50-
ENTRYPOINT ["docker-entrypoint.sh"]
50+
ENTRYPOINT ["container-entrypoint.sh"]
5151
CMD ["%%CMD%%"]

images/yourls/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017-present YOURLS
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)