有没有办法将DOCKER_TLS_VERIFY env变量的值更改为0?

时间:2019-08-20 12:54:53

标签: docker docker-compose docker-swarm

我正在使用docker hub上的docker swarm文档在docker swarm上部署一个简单的flask应用程序。当我使用任何docker机器的IP地址时,它不会显示“ Hello”消息,而是显示一条消息。

我尝试为Windows更改DOCKER_TLS_VERIFY env变量,但是找不到或更改任何内容。我还明确更改了docker文件中的变量,但仍然没有更改。

这是我的docker文件:

# from latest python as parent image
FROM python:latest

# set up the working directory 
WORKDIR /app

# copy the contents from current directory to /app
COPY . /app

# install the requirements from requirements.txt
RUN pip install -r requirements.txt

# set up the enviornment variable
ENV NAME World

# run the app.py when the container launches
CMD ["python", "app.py"]

这是我的docker-compose.yml文件:

version: "3"
services:
  web:
    # replace username/repo:tag with your name and repository ang docker hub
    image: ****/******
    deploy: 
      replicas: 5
      resources: 
        limits:
          cpus: "0.1"
          memory: 50M
      restart_policy:
        condition: on-failure
    ports:
      - "3000:5000"
    networks:
      - webnet
networks: 
  webnet:

预期结果应为:Hello

实际结果是:客户端向HTTPS服务器发送了HTTP请求

0 个答案:

没有答案