Initial commit
This commit is contained in:
parent
17ca077a7f
commit
6ac4516e4a
3 changed files with 45 additions and 0 deletions
19
base/alpine/Dockerfile
Normal file
19
base/alpine/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM --platform=$TARGETOS/$TARGETARCH alpine:latest
|
||||
|
||||
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
|
||||
LABEL upstream="https://github.com/pelican-eggs/yolks"
|
||||
|
||||
RUN apk add --update --no-cache ca-certificates tzdata tini bash
|
||||
RUN adduser -D -h /home/container container
|
||||
|
||||
USER container
|
||||
ENV USER=container HOME=/home/container
|
||||
WORKDIR /home/container
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "-c", "--"]
|
||||
CMD ["/entrypoint.sh"]
|
21
base/alpine/entrypoint.sh
Normal file
21
base/alpine/entrypoint.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Default the TZ environment variable to UTC.
|
||||
TZ=${TZ:-UTC}
|
||||
export TZ
|
||||
|
||||
# Set environment variable that holds the Internal Docker IP
|
||||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||
export INTERNAL_IP
|
||||
|
||||
# Switch to the container's working directory
|
||||
cd /home/container || exit 1
|
||||
|
||||
# Convert all of the "{{VARIABLE}}" parts of the command into the expected shell
|
||||
# variable format of "${VARIABLE}" before evaluating the string and automatically
|
||||
# replacing the values.
|
||||
PARSED=$(echo "$STARTUP" | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||
|
||||
# Display the command we're running in the output, and then execute it with eval
|
||||
printf "\033[1m\033[33mcontainer@ariaos~ \033[0m"
|
||||
echo "$PARSED"
|
||||
# shellcheck disable=SC2086
|
||||
eval "$PARSED"
|
5
build.sh
Executable file
5
build.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine
|
||||
docker push git.zontreck.com/ariascreations/yolks:alpine
|
Loading…
Add table
Add a link
Reference in a new issue