mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-07-22 20:33:29 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
9767c69658
|
|||
1457a648ef
|
|||
0811260ffc
|
|||
4bdeed1c25
|
|||
0c3acf2bbb
|
|||
5e8f02f7c4
|
|||
7dab010604
|
|||
88d7aa0bf5
|
14
.github/workflows/dockerimage.yml
vendored
14
.github/workflows/dockerimage.yml
vendored
@@ -19,6 +19,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- name: Build squid image
|
||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
||||
|
||||
@@ -35,6 +42,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
||||
git submodule sync --recursive
|
||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
|
||||
- name: Build squid image
|
||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
||||
|
||||
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[submodule "squid"]
|
||||
path = squid
|
||||
url = https://github.com/squid-cache/squid
|
||||
branch = v5
|
34
Dockerfile
34
Dockerfile
@@ -1,8 +1,5 @@
|
||||
FROM alpine:3.11.3 as build
|
||||
|
||||
ENV SQUID_VER 5.0.1
|
||||
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
||||
|
||||
RUN set -x && \
|
||||
apk add --no-cache \
|
||||
gcc \
|
||||
@@ -21,27 +18,15 @@ RUN set -x && \
|
||||
libcap-dev \
|
||||
linux-headers
|
||||
|
||||
RUN set -x && \
|
||||
mkdir -p /tmp/build && \
|
||||
cd /tmp/build && \
|
||||
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz -o squid-${SQUID_VER}.tar.gz && \
|
||||
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz.asc -o squid-${SQUID_VER}.tar.gz.asc
|
||||
|
||||
RUN set -x && \
|
||||
cd /tmp/build && \
|
||||
export GNUPGHOME="$(mktemp -d)" && \
|
||||
( \
|
||||
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys ${SQUID_SIG_KEY} || \
|
||||
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys ${SQUID_SIG_KEY} || \
|
||||
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys ${SQUID_SIG_KEY} \
|
||||
) && \
|
||||
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
|
||||
rm -rf "$GNUPGHOME"
|
||||
|
||||
RUN set -x && \
|
||||
cd /tmp/build && \
|
||||
tar --strip 1 -xzf squid-${SQUID_VER}.tar.gz && \
|
||||
\
|
||||
COPY squid /tmp/build
|
||||
WORKDIR /tmp/build/
|
||||
|
||||
RUN sed -i 's/ed -s/ed/g' bootstrap.sh
|
||||
RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15
|
||||
RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15
|
||||
RUN sh bootstrap.sh
|
||||
|
||||
RUN \
|
||||
CFLAGS="-g0 -O2" \
|
||||
CXXFLAGS="-g0 -O2" \
|
||||
LDFLAGS="-s" \
|
||||
@@ -94,7 +79,6 @@ RUN set -x && \
|
||||
--with-pidfile=/var/run/squid/squid.pid
|
||||
|
||||
RUN set -x && \
|
||||
cd /tmp/build && \
|
||||
make -j $(grep -cs ^processor /proc/cpuinfo) && \
|
||||
make install
|
||||
|
||||
|
4
hooks/post_checkout
Normal file
4
hooks/post_checkout
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
git submodule update --init
|
||||
|
1
squid
Submodule
1
squid
Submodule
Submodule squid added at f4ade365f8
Reference in New Issue
Block a user