The Ethereum PPA generally provides the latest version of Geth. However, if you specifically need version 1.7.3, you can try the following approach. Note that it might not always work, as PPAs usually maintain the latest versions.
FROM ubuntu:latest
# Install necessary dependencies
RUN apt-get update \
&& apt-get install -y software-properties-common
# Add the Ethereum PPA
RUN add-apt-repository -y ppa:ethereum/ethereum
# Update the package list
RUN apt-get update
# Install the desired version of geth
RUN apt-get install -y ethereum=1.7.3+build11486+zesty
# Clean up
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Your other Dockerfile commands go here
In this Dockerfile, the ethereum=1.7.3+build11486+zesty specifies the version you want to install. Note that the success of this approach depends on whether the PPA maintains the older versions.
Keep in mind that using a specific version like this may result in missing out on important updates and security fixes. It's generally recommended to use the latest stable version of software. If possible, consider updating your application to be compatible with the latest version of Geth.