-
Notifications
You must be signed in to change notification settings - Fork 3
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
0 parents
commit eacb63a
Showing
5 changed files
with
46 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Image name: faucet/base | ||
|
||
FROM alpine:3.7 | ||
RUN apk add --no-cache bash su-exec | ||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
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,6 @@ | ||
## Image name: faucet/base-pi | ||
|
||
FROM multiarch/alpine:armhf-v3.7 | ||
RUN apk add --no-cache bash su-exec | ||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
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,15 @@ | ||
Faucet Base Docker Image | ||
======================== | ||
|
||
This is the base image used for many of the other Docker images for the | ||
`faucet project <https://faucet.nz>`_. | ||
|
||
Pull from Docker Hub | ||
-------------------- | ||
|
||
Built images are available on Docker Hub so that you don't need to build your own. | ||
|
||
Images are available for the following architectures: | ||
|
||
* `amd64 <https://hub.docker.com/r/faucet/base/>`_ | ||
* `armhf (for raspberry pi) <https://hub.docker.com/r/faucet/base-pi/>`_ |
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,15 @@ | ||
#!/bin/bash | ||
|
||
# Add local user | ||
# Either use the LOCAL_USER_ID if passed in at runtime or | ||
# fallback to 0 to maintain backwards compatibility | ||
|
||
USER_ID=${LOCAL_USER_ID:-0} | ||
GROUP_ID=${LOCAL_GROUP_ID:-0} | ||
|
||
echo "Starting with UID=$USER_ID GID=$GROUP_ID" | ||
export HOME=/home/faucet | ||
addgroup -g $GROUP_ID faucet >/dev/null 2>&1 || true | ||
adduser -u $USER_ID -G faucet -g "" -h $HOME -D faucet >/dev/null 2>&1 || true | ||
|
||
exec /sbin/su-exec faucet "$@" |
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,4 @@ | ||
#!/bin/bash | ||
|
||
# We need qemu-user-static for arm/pi builds | ||
docker run --rm --privileged multiarch/qemu-user-static:register --reset |