This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
generated from homecentr/docker-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
8 changed files
with
58 additions
and
9 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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
- master | ||
|
||
env: | ||
IMAGE_NAME: "homecentr/$$IMAGE_NAME$$" | ||
IMAGE_NAME: "homecentr/base" | ||
|
||
jobs: | ||
build: | ||
|
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,15 @@ | ||
FROM alpine | ||
FROM alpine:3.11.3 as s6 | ||
|
||
ENV S6_VERSION="v1.22.1.0" | ||
ENV CPU_ARCH="amd64" | ||
|
||
ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_VERSION}/s6-overlay-${CPU_ARCH}.tar.gz /tmp/ | ||
|
||
RUN mkdir /s6 && \ | ||
tar xzf /tmp/s6-overlay-${CPU_ARCH}.tar.gz -C /s6 | ||
|
||
FROM scratch | ||
|
||
COPY --from=s6 /s6 / | ||
|
||
COPY ./etc /etc |
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,2 +1,2 @@ | ||
# HomeCentr - $$IMAGE_NAME$$ | ||
# HomeCentr - base | ||
Template repository for Docker container repositories |
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,26 @@ | ||
#!/usr/bin/with-contenv ash | ||
PUID=${PUID:-7077} | ||
PGID=${PGID:-7077} | ||
|
||
if ( ! type "groupadd" > /dev/null;) || (! type "useradd" > /dev/null; ) | ||
then | ||
>&2 echo "Cannot create user, please install shadow package!" | ||
exit 1 | ||
fi | ||
|
||
addgroup -g $PGID nonroot | ||
adduser -u $PUID -G nonroot -D nonroot | ||
|
||
echo ' | ||
__ __ __ | ||
/ / / /___ ____ ___ ___ ________ ____ / /______ | ||
/ /_/ / __ \/ __ `__ \/ _ \/ ___/ _ \/ __ \/ __/ ___/ | ||
/ __ / /_/ / / / / / / __/ /__/ __/ / / / /_/ / | ||
/_/ /_/\____/_/ /_/ /_/\___/\___/\___/_/ /_/\__/_/ | ||
' | ||
echo " | ||
------------------------------------- | ||
User uid: $(id -u nonroot) | ||
User gid: $(id -g nonroot) | ||
------------------------------------- | ||
" |
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,9 @@ | ||
FROM base as base | ||
|
||
FROM alpine | ||
|
||
COPY --from=base / / | ||
|
||
RUN apk add --no-cache shadow | ||
|
||
ENTRYPOINT [ "/init" ] |
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-base", | ||
"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-base.git" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/homecentr/docker-$$IMAGE_NAME$$/issues" | ||
"url": "https://github.com/homecentr/docker-base/issues" | ||
}, | ||
"homepage": "https://github.com/homecentr/docker-$$IMAGE_NAME$$#readme" | ||
"homepage": "https://github.com/homecentr/docker-base#readme" | ||
} |