# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. FROM public.ecr.aws/lts/ubuntu:20.04_stable ENV SQUID_VERSION=4.1 \ SQUID_CACHE_DIR=/var/spool/squid \ SQUID_LOG_DIR=/var/log/squid \ SQUID_USER=proxy RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y squid=${SQUID_VERSION}* && rm -rf /var/lib/apt/lists/* # Workaround for https://github.com/moby/moby/issues/31243 RUN usermod -a -G tty proxy COPY entrypoint.sh /sbin/entrypoint.sh RUN chmod 755 /sbin/entrypoint.sh COPY squid.conf /etc/squid/squid.conf COPY allowedlist.txt /etc/squid/allowedlist.txt EXPOSE 3128/tcp USER proxy ENTRYPOINT ["/sbin/entrypoint.sh"]