Phoenix self signed https certificate in dev container

Hey devs,

I am building a website using phoenix inside a container using vscode from few months. Recently i tried to enable https endpoint using mix phx.gen.cert. But i am getting below warning for every ping. I am not docker or domains expert :frowning: . Any idea on how to fix it?

[info] TLS :server: In state :abbreviated received CLIENT ALERT: Fatal - Certificate Unknown

[info] TLS :server: In state :abbreviated received CLIENT ALERT: Fatal - Certificate Unknown
.Dockerfile

FROM elixir:1.11.3

RUN apt-get update \
  && curl -sL https://deb.nodesource.com/setup_12.x | bash \
  && apt-get install -y apt-utils \
  && apt-get install -y nodejs \
  && apt-get install -y build-essential \
  && apt-get install -y inotify-tools \
  && apt-get install -y zsh \
  && apt-get install -y vim \
  && mix local.hex --force \
  && mix local.rebar -- \
  && apt-get install -y ruby \
  && gem install --no-ri --no-rdoc htmlbeautifier \
  && npm i -g npm \
  && apt-get autoremove -y \
  && apt-get clean -y \
  && rm -rf /var/lib/apt/lists/*

RUN sh -c "$(curl -sSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN git clone https://github.com/romkatv/powerlevel10k.git ~/.oh-my-zsh/custom/themes/powerlevel10k
---
.docker-compose

version: "3.7"
services:
  db:
    image: postgres:13.1
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
    volumes:
      - "database:/var/lib/postgresql/data"
    ports:
      - 5432:5432

  app:
    build:
      context: ../
      dockerfile: .devcontainer/Dockerfile
    command: sleep infinity
    environment:
      MIX_ENV: dev
    ports:
      - "4001:4001"
    volumes:
      # Mounts the project folder to '/workspace'. The target path inside the container
      # should match should match what your application expects. In this case, the
      # compose file is in a sub-folder, so we will mount '..'. We'll then reference this
      # as the workspaceFolder in '.devcontainer/devcontainer.json' so VS Code starts here.
      - ..:/app:cached
      - .zshrc:/root/.zshrc
      - .p10k.zsh:/root/.p10k.zsh

      # This lets you avoid setting up Git again in the container
      - ~/.gitconfig:/root/.gitconfig
    depends_on:
      - db

volumes:
  database:

dev.exs conf file

config :je, JeWeb.Endpoint,
  https: [
    port: 4001,
    cipher_suite: :strong,
    certfile: "priv/cert/selfsigned.pem",
    keyfile: "priv/cert/selfsigned_key.pem"
  ],