Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/3x3cut0r/docker
Browse files Browse the repository at this point in the history
  • Loading branch information
3x3cut0r committed Nov 14, 2023
2 parents ad2d187 + 161a12a commit 225f365
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Tag
id: tag
run: |
docker build -t 3x3cut0r/alpine:latest ./alpine
VERSION=$(docker run --rm 3x3cut0r/alpine:latest sh -c "cat /VERSION | grep alpine | cut -d= -f2")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
# https://github.com/docker/build-push-action
- name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -50,3 +57,4 @@ jobs:
push: true
tags: |
3x3cut0r/alpine:latest
3x3cut0r/alpine:${{ steps.tag.outputs.VERSION }}
8 changes: 8 additions & 0 deletions .github/workflows/tftpd-hpa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Tag
id: tag
run: |
docker build -t 3x3cut0r/tftpd-hpa:latest ./tftpd-hpa
VERSION=$(docker run --rm 3x3cut0r/tftpd-hpa:latest sh -c "cat /VERSION | grep tftpd-hpa | cut -d= -f2")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
# https://github.com/docker/build-push-action
- name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -52,3 +59,4 @@ jobs:
push: true
tags: |
3x3cut0r/tftpd-hpa:latest
3x3cut0r/tftpd-hpa:${{ steps.tag.outputs.VERSION }}
24 changes: 18 additions & 6 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM alpine:latest
ARG IMAGE=alpine:latest

# App-Stage
FROM ${IMAGE}
ARG IMAGE

LABEL maintainer="Julian Reith <julianreith@gmx.de>"
LABEL description="official alpine linux with gosu, libcap installed"

# add gosu
WORKDIR /

# Add gosu
ENV GOSU_VERSION 1.16
RUN set -eux; \
\
Expand All @@ -16,21 +23,26 @@ RUN set -eux; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
\
# verify the signature
# Verify the signature
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
command -v gpgconf && gpgconf --kill all || :; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
# clean up fetch dependencies
# Clean up fetch dependencies
apk del --no-network .gosu-deps; \
\
chmod +x /usr/local/bin/gosu; \
# verify that the binary works
# Verify that the binary works
gosu --version; \
gosu nobody true

# add dependencies for all images
# Add dependencies for all images
RUN apk add --no-cache tzdata \
libcap

# Store versions in /VERSION
RUN touch /VERSION && \
echo "alpine=$(cat /etc/alpine-release)" > /VERSION && \
echo "gosu=$GOSU_VERSION" >> /VERSION
2 changes: 1 addition & 1 deletion glype-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:latest as build
LABEL maintainer="Julian Reith <julianreith@gmx.de>"
LABEL description="glype - a web-based proxy on webdevops/php-nginx:7.4-alpine"
LABEL description="glype - a web-based proxy on webdevops/php-nginx:8.0-alpine"

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion llama-cpp-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
6. [Find Me](#findme)
7. [License](#license)

## 1 Usage {#usage}
## 1 Usage <a name="usage"></a>

**IMPORTANT: you need to add SYS_RESOURCE capability to enable MLOCK support**

Expand Down
2 changes: 2 additions & 0 deletions streamlit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ docker run -d \

```shell
version: '3.9'

services:
# https://hub.docker.com/r/3x3cut0r/streamlit
streamlit:
image: 3x3cut0r/streamlit:latest
container_name: streamlit
environment:
TZ: Europe/Berlin
volumes:
Expand Down
14 changes: 8 additions & 6 deletions streamlit/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ set -e
# Set PATH for the virtual environment
export PATH="/venv/bin:$PATH"

# Set ownership
chown -R root:root /app

# Set permissions
chmod -R 644 /app
chmod -R 755 /app

############################
# setup user environment #
############################

# install python requirements
# install python requirements (only once)
install_complete="/app/requirements.complete"
if [ -s /app/requirements.txt ]; then
/venv/bin/pip install --no-cache-dir -r /app/requirements.txt > /dev/null 2>&1
if [ ! -f $install_complete ]; then
/venv/bin/pip install --no-cache-dir --disable-pip-version-check --quiet -r /app/requirements.txt
touch $install_complete
fi
fi

# TIMEZONE
Expand All @@ -41,5 +42,6 @@ if [ "$#" = "0" ]; then
# if started with args, run args instead
else
exec "$@"
exit 0
fi

6 changes: 5 additions & 1 deletion tftpd-hpa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ RUN addgroup -g $GID -S tftp && \
# add tftp-hpa
RUN apk add --no-cache tftp-hpa runit tzdata && \
mkdir -p /tftpboot \
/runit-services \
/runit-services/tftpd-hpa \
/runit-services/syslogd && \
echo -e "#!/bin/sh\nbusybox syslogd -n -O /dev/stdout" > \
Expand All @@ -29,6 +28,11 @@ RUN apk add --no-cache tftp-hpa runit tzdata && \
chmod +x /runit-services/syslogd/run \
/runit-services/tftpd-hpa/run

# store versions in /VERSION
RUN touch /VERSION && \
echo "alpine=$(cat /etc/alpine-release)" > /VERSION && \
echo "tftpd-hpa=$(/usr/sbin/in.tftpd --version | cut -d, -f1 | cut -d' ' -f2)" >> /VERSION

# tftpd-hpa environment variables
# (see: https://manpages.debian.org/testing/tftpd-hpa/tftpd.8.en.html)
ENV TZ="UTC" \
Expand Down
2 changes: 1 addition & 1 deletion tftpd-hpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ docker run -d \
### 1.2 docker-compose.yaml <a name="docker-compose"></a>

```shell
version: '3'
version: '3.9'

services:
tftpd-hpa:
Expand Down
20 changes: 18 additions & 2 deletions tftpd-hpa/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/sh
set -e

############################
# setup user environment #
############################

# set timezone
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

############################
# run app #
############################

# if started without args, exec in.tftpd
if [ "$#" = "0" ]; then

param=""
if [ "$BLOCKSIZE" != "" ]; then param="${param} --blocksize $BLOCKSIZE"; fi
if [ "$CREATE" = "1" ]; then param="${param} --create"; fi
Expand All @@ -18,21 +29,26 @@ if [ "$#" = "0" ]; then
if [ "$VERBOSE" = "1" ]; then param="${param} --verbose"; fi
if [ "$VERBOSITY" != "" ]; then param="${param} --verbosity $VERBOSITY"; fi
param="--foreground --address 0.0.0.0:69 --user tftp ${param} /tftpboot"

echo -e "\nINFO: /usr/sbin/in.tftpd ${param}\n"
echo -e "#!/bin/sh\n/usr/sbin/in.tftpd ${param}" > /runit-services/tftpd-hpa/run

else
# if first arg looks like a flag, assume we want to run in.tftpd
if [ "$( echo "$1" | cut -c1 )" = "-" ]; then
echo -e "\nINFO: /usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@\n"
echo -e "#!/bin/sh\n/usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@" > /runit-services/tftpd-hpa/run

# if the first arg is "in.tftpd" ...
elif [ "$1" = "in.tftpd" ]; then
echo -e "\nINFO: /usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp $@\n"
echo -e "#!/bin/sh\n/usr/sbin/in.tftpd --foreground --address 0.0.0.0:69 --user tftp ${@}" > /runit-services/tftpd-hpa/run

# if first arg doesn't looks like a flag
else
printf "\nINFO: $@\n\n"
echo -e "#!/bin/sh\n$@" > /runit-services/tftpd-hpa/run
exec "$@"
exit 0
fi
fi

exec runsvdir /runit-services
2 changes: 1 addition & 1 deletion tvheadend-sundtek/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2d92f58f-ls190
62adbebf-ls192

0 comments on commit 225f365

Please sign in to comment.