Docker cannot build Debian-based image on Windows 7EE x64 SP1

My setup is somewhat unusual. The Windows is a VMWare guest running on Ubuntu 17.10 host. I have installed Docker Toolbox (docker version 18.02.0-ce) and have tried the following:

docker run -it debian:jessie /bin/bash

It was successful and I can install software using apt-get. Then I tried to build the following Dockerfile:

FROM debian:jessie

RUN apt-get update && apt-get install -y curl

And I get the following output:

$ docker build -t my-first-image .
Sending build context to Docker daemon  6.656kB
Step 1/14 : FROM debian:jessie
 ---> 5dd74d62fab8
Step 2/14 : RUN apt-get update && apt-get install -y curl
ext apt-transport-https
 ---> Running in 7533a156a974
Get:1 jessie/updates InRelease [63.1 kB]
Get:2 jessie/updates/main amd64 Packages [641 kB]
Ign jessie InRelease
Get:3 jessie-updates InRelease [145 kB]
Get:4 jessie Release.gpg [2434 B]
Get:5 jessie Release [148 kB]
Get:6 jessie-updates/main amd64 Packages [23.1 kB]
Get:7 jessie/main amd64 Packages [9064 kB]
Fetched 10.1 MB in 34s (295 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
local error: tls: bad record MAC

If I issue the build command again, I get the following:

Sending build context to Docker daemon  6.656kB
Step 1/14 : FROM debian:jessietls: received record with version c when expecting version 303

Why does it not succeed as a part of the build process when it succeeds during manual operations? I have read up on disabling TLS for a docker-machine, but I do not see how that could benefit me.