Getting ERROR: Service 'ctixappserver' failed to build when run the command 'docker-compose build'

ERROR: Service ‘ctixappserver’ failed to build: Get https://registry-1.docker.io/v2/: proxyconnect tcp: tls: first record does not look like a TLS handshake

As I have followed Docker documentation and set all information correctly in my Ubuntu system.
I have set
HTTP_PROXY=http://172.27.10.68:3128
HTTPS_PROXY=http://172.27.10.68:3128
(I also have tried with https)

I have run below command
sudo docker-compose build

Then I am getting this error.

redis uses an image, skipping
db uses an image, skipping
elasticsearch uses an image, skipping
Building ctixappserver
Step 1/11 : FROM python:3.6
ERROR: Service ‘ctixappserver’ failed to build: Get https://registry-1.docker.io/v2/: proxyconnect tcp: tls: first record does not look like a TLS handshake

Please guide me to resolve this issue.