-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from Financial-Times/feature/UPPSF-4336-upgrad…
…e-base-image Upgrade Dockerfile base image from Ubuntu 18.04 LTS to 22.04 LTS
- Loading branch information
Showing
1 changed file
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
# Starting from Ubuntu and not from alpine, as libvmod-dynamic used for generating dynamic backends | ||
# compiles currently only on debian based images. | ||
FROM ubuntu:bionic | ||
FROM ubuntu:jammy | ||
|
||
ENV VARNISHSRC=/usr/include/varnish VMODDIR=/usr/lib/varnish/vmods | ||
# Install build dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y curl apt-transport-https gnupg && \ | ||
curl -L https://packagecloud.io/varnishcache/varnish60lts/gpgkey | apt-key add - && \ | ||
echo "deb https://packagecloud.io/varnishcache/varnish60lts/ubuntu/ jammy main" | tee /etc/apt/sources.list.d/varnish-cache.list && \ | ||
apt-get update && \ | ||
apt-get install -y libgetdns-dev varnish=6.0.11-1~jammy varnish-dev=6.0.11-1~jammy | ||
|
||
RUN apt-get update -q && \ | ||
apt-get install -qq git curl apt-transport-https autotools-dev automake autoconf libtool python make python-docutils sudo gnupg2 && \ | ||
curl -L https://packagecloud.io/varnishcache/varnish62/gpgkey | sudo apt-key add - && \ | ||
echo "deb https://packagecloud.io/varnishcache/varnish62/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/varnish-cache.list && \ | ||
apt-get -q update && \ | ||
apt-get install -qq libgetdns-dev && \ | ||
apt-get install -qq varnish varnish-dev && \ | ||
cd / && echo "-------mod-dynamic build -------" && \ | ||
git clone -b 6.2 https://github.com/nigoroll/libvmod-dynamic.git && \ | ||
cd libvmod-dynamic && \ | ||
# Clone and compile libvmod-dynamic | ||
RUN apt-get -y install git autotools-dev automake autoconf libtool make docutils-common | ||
RUN git clone -b 6.0 https://github.com/nigoroll/libvmod-dynamic.git /tmp/libvmod-dynamic && \ | ||
cd /tmp/libvmod-dynamic && \ | ||
./autogen.sh && \ | ||
./configure && \ | ||
make && \ | ||
make install && \ | ||
apt-get remove -qq git curl apt-transport-https autotools-dev automake autoconf libtool python make python-docutils gnupg2 --allow-remove-essential && \ | ||
apt-get -qq autoremove && \ | ||
apt-get -qq clean && \ | ||
rm -rf /libvmod-dynamic | ||
make install | ||
|
||
# Remove build dependencies and clean up | ||
RUN apt-get remove -y curl apt-transport-https gnupg git autotools-dev automake autoconf libtool make docutils-common varnish-dev && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* | ||
|
||
WORKDIR / | ||
COPY default.vcl /etc/varnish/default.vcl | ||
COPY start.sh /start.sh | ||
|
||
RUN chmod +x /start.sh | ||
|
||
# Expose port and start | ||
EXPOSE 80 | ||
CMD ["/start.sh"] |