Failed to download codec?

I’m running plex server in docker on a headless server, using the this simple docker-compose.yml:

version: '3'
services:
  plex:
    image: plexinc/pms-docker
    volumes:
      - plex-database:/config
      - plex-transcode:/transcode
      - /media/store:/data
    environment:
      - TZ="Aemrica/Toronto"
      - PLEX_UID=975
      - PLEX_GID=975
    network_mode: host
volumes:
  plex-database:
  plex-transcode:

Everything works fine except that the server can’t transcode videos using h264 codec. Here is the part of log that I think relevant.

Mar 26, 2018 21:55:40.411 [0x7fa779bfd700] ERROR - Error issuing curl_easy_perform(handle): 6
Mar 26, 2018 21:55:40.411 [0x7fa779bfd700] WARN - HTTP error requesting GET http://userserve-ak.last.fm/serve/252/46209667.png (0, No error) (Couldn't resolve host 'userserve-ak.last.fm')
Mar 26, 2018 21:57:52.062 [0x7fa778bff700] ERROR - Extras: Preroll file didn't exist or couldn't be read: ''.
Mar 26, 2018 21:58:08.470 [0x7fa7773ff700] ERROR - Error issuing curl_easy_perform(handle): 28
Mar 26, 2018 21:58:08.470 [0x7fa7773ff700] ERROR - Codecs: Download failed: Failed to download 'https://downloads.plex.tv/codecs/7814ac9-1285/linux-ubuntu-x86_64/liblibx264_encoder.so': 408
Mar 26, 2018 21:58:08.471 [0x7fa7773ff700] ERROR - Error configuring transcoder: Encoder install failed: libx264

Apparently it tried to get the codec from downloads.plex.tv but failed due to request time out. It looks like the network is not properly setup but plex can retrieve meta data like fan arts from the web. The full log is attached.