I had a similar problem. The solution was to install libssl-dev and then ext-ftp. So in the Dockerfile you need to add in this order:
RUN apt-get update && apt-get install -y libssl-dev
RUN docker-php-ext-configure ftp --with-openssl-dir=/usr \
&& docker-php-ext-install ftp