Compare commits

...

6 Commits

Author SHA1 Message Date
Dmitry Belyaev 8aab792bc1 bump squid to 6.9 2024-04-24 12:55:07 +03:00
dependabot[bot] 7ea8a5793f Bump actions/cache from 4.0.1 to 4.0.2
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.1...v4.0.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 08:54:55 +03:00
Dmitry Belyaev a3b674e1d5
CMD /run.sh 2024-03-26 12:32:52 +03:00
Dmitry Belyaev 2bd55e0a98
fix timezone setup #133 2024-03-26 12:09:03 +03:00
Dmitry Belyaev fb56ae5164 bump squid to 6.8 2024-03-24 12:50:45 +03:00
dependabot[bot] bb4a85b410 Bump actions/cache from 4.0.0 to 4.0.1
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4.0.0...v4.0.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 09:05:29 +03:00
3 changed files with 22 additions and 10 deletions

View File

@ -39,7 +39,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4.0.0
uses: actions/cache@v4.0.2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
@ -153,7 +153,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4.0.0
uses: actions/cache@v4.0.2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}

View File

@ -1,6 +1,6 @@
FROM alpine:3.19.1 as build
ARG SQUID_VER=6.7
ARG SQUID_VER=6.9
RUN set -x && \
apk add --no-cache \
@ -119,13 +119,16 @@ RUN apk add --no-cache \
libstdc++ \
heimdal-libs \
libcap \
libltdl
libltdl \
tzdata
COPY --from=build /etc/squid/ /etc/squid/
COPY --from=build /usr/lib/squid/ /usr/lib/squid/
COPY --from=build /usr/share/squid/ /usr/share/squid/
COPY --from=build /usr/sbin/squid /usr/sbin/squid
COPY --from=build /usr/bin/squidclient /usr/bin/squidclient
COPY --chmod=755 run.sh /
RUN install -d -o squid -g squid \
/var/cache/squid \
@ -138,14 +141,9 @@ RUN install -d -o squid -g squid \
touch /etc/squid/conf.d/placeholder.conf
COPY squid-log.conf /etc/squid/conf.d.tail/
RUN set -x && \
apk add --no-cache --virtual .tz alpine-conf tzdata && \
/sbin/setup-timezone -z $TZ && \
apk del .tz
VOLUME ["/var/cache/squid"]
EXPOSE 3128/tcp
USER squid
CMD ["sh", "-c", "rm -f /var/run/squid/squid.pid ; /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -z && exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -YCd 1"]
CMD ["/run.sh"]

14
run.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/sh
set -x
# force remove pid
if [ -e /var/run/squid/squid.pid ]; then
rm -f /var/run/squid/squid.pid
fi
# init cache
/usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -z
# run squid
exec /usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -YCd 1