This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
generated from homecentr/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
449 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* text=auto | ||
*.sh eol=lf | ||
**/run eol=lf | ||
**/finish eol=lf | ||
*/services.d/* eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
FROM alpine | ||
FROM traefik:v2.2.1 as traefik | ||
|
||
FROM homecentr/base:2.4.0-alpine | ||
|
||
ENV TRAEFIK_ARGS="" | ||
ENV XDG_CONFIG_HOME="/config" | ||
|
||
COPY --from=traefik /usr/local/bin/traefik /usr/local/bin/traefik | ||
COPY --from=traefik /etc/ssl/certs /etc/ssl/certs | ||
|
||
# Grant the named process to open a well-known port (1-1024) which normally requires root permissions | ||
RUN apk add --no-cache libcap=2.27-r0 && \ | ||
setcap 'cap_net_bind_service=+ep' /usr/local/bin/traefik | ||
|
||
COPY ./fs/ / | ||
|
||
VOLUME "/config" | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
[![Project status](https://badgen.net/badge/project%20status/stable%20%26%20actively%20maintaned?color=green)](https://github.com/homecentr/docker-$$IMAGE_NAME$$/graphs/commit-activity) [![](https://badgen.net/github/label-issues/homecentr/docker-$$IMAGE_NAME$$/bug?label=open%20bugs&color=green)](https://github.com/homecentr/docker-$$IMAGE_NAME$$/labels/bug) [![](https://badgen.net/github/release/homecentr/docker-$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![](https://badgen.net/docker/pulls/homecentr/$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![](https://badgen.net/docker/size/homecentr/$$IMAGE_NAME$$)](https://hub.docker.com/repository/docker/homecentr/$$IMAGE_NAME$$) | ||
[![Project status](https://badgen.net/badge/project%20status/stable%20%26%20actively%20maintaned?color=green)](https://github.com/homecentr/docker-traefik/graphs/commit-activity) [![](https://badgen.net/github/label-issues/homecentr/docker-traefik/bug?label=open%20bugs&color=green)](https://github.com/homecentr/docker-traefik/labels/bug) [![](https://badgen.net/github/release/homecentr/docker-traefik)](https://hub.docker.com/repository/docker/homecentr/traefik) | ||
[![](https://badgen.net/docker/pulls/homecentr/traefik)](https://hub.docker.com/repository/docker/homecentr/traefik) | ||
[![](https://badgen.net/docker/size/homecentr/traefik)](https://hub.docker.com/repository/docker/homecentr/traefik) | ||
|
||
![CI/CD on master](https://github.com/homecentr/docker-$$IMAGE_NAME$$/workflows/CI/CD%20on%20master/badge.svg) | ||
![Regular Docker image vulnerability scan](https://github.com/homecentr/docker-$$IMAGE_NAME$$/workflows/Regular%20Docker%20image%20vulnerability%20scan/badge.svg) | ||
![CI/CD on master](https://github.com/homecentr/docker-traefik/workflows/CI/CD%20on%20master/badge.svg) | ||
![Regular Docker image vulnerability scan](https://github.com/homecentr/docker-traefik/workflows/Regular%20Docker%20image%20vulnerability%20scan/badge.svg) | ||
|
||
|
||
# HomeCentr - $$IMAGE_NAME$$ | ||
|
||
# HomeCentr - traefik | ||
This docker image is a repack of [Traefik](https://github.com/containous/traefik) compliant with the HomeCenter docker images standard (S6 overlay, privilege drop etc.). | ||
|
||
## Usage | ||
|
||
```yml | ||
version: "3.7" | ||
services: | ||
$$IMAGE_NAME$$: | ||
build: . | ||
image: homecentr/$$IMAGE_NAME$$ | ||
traefik: | ||
image: homecentr/traefik | ||
ports: | ||
- "80:80" | ||
``` | ||
## Environment variables | ||
| Name | Default value | Description | | ||
|------|---------------|-------------| | ||
| PUID | 7077 | UID of the user $$IMAGE_NAME$$ should be running as. | | ||
| PGID | 7077 | GID of the user $$IMAGE_NAME$$ should be running as. | | ||
| PUID | 7077 | UID of the user traefik should be running as. | | ||
| PGID | 7077 | GID of the user traefik should be running as. | | ||
| TRAEFIK_ARGS | | Additional arguments to pass to Traefic. | | ||
## Exposed ports | ||
| Port | Protocol | Description | | ||
|------|------|-------------| | ||
| 80 | TCP | Some useful details | | ||
| 80 | TCP | Default HTTP | | ||
> Traefik can expose any configured port (e.g. HTTPS/443) but it needs to configured. The table specifies only the ports explicitly exposed in the Dockerfile. | ||
## Volumes | ||
| Container path | Description | | ||
|------------|---------------| | ||
| /config | Some useful details | | ||
| /config | Traefik configuration files in case you decide to configure it using a file. The files can also be placed at `/etc/traefik`, but for unification with other homecentr images the default location is /config. | | ||
|
||
## Security | ||
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-$$IMAGE_NAME$$/security). | ||
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-traefik/security). | ||
|
||
### Container user | ||
The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The $$IMAGE_NAME$$ process runs as UID/GID provided in the PUID and PGID environment variables. | ||
The container supports privilege drop. Even though the container starts as root, it will use the permissions only to perform the initial set up. The traefik process runs as UID/GID provided in the PUID and PGID environment variables. | ||
|
||
:warning: Do not change the container user directly using the `user` Docker compose property or using the `--user` argument. This would break the privilege drop logic. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
version: "3.7" | ||
services: | ||
$$IMAGE_NAME$$: | ||
nginx: | ||
image: nginx | ||
ports: | ||
- "8080:80" | ||
volumes: | ||
- ./example/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro | ||
|
||
traefik: | ||
build: . | ||
image: homecentr/$$IMAGE_NAME$$ | ||
restart: unless-stopped | ||
image: homecentr/traefik:local | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./example/traefik/traefik.yaml:/config/traefik.yaml:ro | ||
- ./example/traefik/nginx.yaml:/nginx.yaml:ro | ||
|
||
networks: | ||
default: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
server { | ||
listen 80; | ||
|
||
location / { | ||
return 200 'Hello, world!'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
http: | ||
routers: | ||
nginx-file: | ||
entryPoints: | ||
- http | ||
service: nginx | ||
rule: Path(`/nginx`) | ||
|
||
services: | ||
nginx: | ||
loadBalancer: | ||
servers: | ||
- url: http://nginx:80/ | ||
passHostHeader: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
providers: | ||
file: | ||
filename: /nginx.yaml | ||
|
||
entryPoints: | ||
http: | ||
address: ":80" | ||
|
||
ping: | ||
entryPoint: "http" | ||
|
||
api: | ||
dashboard: true | ||
insecure: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/execlineb -S1 | ||
|
||
s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/with-contenv ash | ||
|
||
exec runas traefik $TRAEFIK_ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"name": "homecentr-$$IMAGE_NAME$$", | ||
"name": "homecentr-traefik", | ||
"version": "1.0.0", | ||
"description": "", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/homecentr/docker-$$IMAGE_NAME$$.git" | ||
"url": "git+https://github.com/homecentr/docker-traefik.git" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/homecentr/docker-$$IMAGE_NAME$$/issues" | ||
"url": "https://github.com/homecentr/docker-traefik/issues" | ||
}, | ||
"homepage": "https://github.com/homecentr/docker-$$IMAGE_NAME$$#readme" | ||
"homepage": "https://github.com/homecentr/docker-traefik#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.