File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " docker"
4+ directory : " /"
5+ schedule :
6+ interval : " daily"
Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Images
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Set up QEMU
18+ uses : docker/setup-qemu-action@v3
19+
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Log in to GitHub Container Registry
24+ uses : docker/login-action@v3
25+ with :
26+ registry : ghcr.io
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Build and push the tinyproxy image
31+ uses : docker/build-push-action@v6
32+ with :
33+ context : .
34+ platforms : linux/amd64,linux/arm64
35+ push : true
36+ tags : ghcr.io/querateam/docker-tinyproxy:latest
Original file line number Diff line number Diff line change 1+ FROM alpine:latest
2+ WORKDIR /app
3+ RUN apk add --no-cache tinyproxy curl
4+ COPY run.sh /app/run.sh
5+ EXPOSE 8888
6+ ENTRYPOINT ["/bin/sh" , "/app/run.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ CONFIG_FILE=" /etc/tinyproxy/tinyproxy.conf"
4+ FILTER_FILE=" /etc/tinyproxy/filter"
5+
6+ sed -i " s|^Allow |#Allow |" " $CONFIG_FILE "
7+
8+ if [ ! -z $ALLOWED_HOSTS ]; then
9+ sed -i " s|^#Filter .*|Filter \" ${FILTER_FILE} \" |" " $CONFIG_FILE "
10+ sed -i " s|^#FilterDefaultDeny .*|FilterDefaultDeny Yes|" " $CONFIG_FILE "
11+
12+ touch $FILTER_FILE
13+ for host in $( echo $ALLOWED_HOSTS | tr ' ,' ' \n' ) ; do
14+ echo " $host " >> " $FILTER_FILE "
15+ done
16+ fi
17+
18+ exec tinyproxy -d -c $CONFIG_FILE
You can’t perform that action at this time.
0 commit comments