Build folly container in Ubuntu 22.04

Environment

  • Ubuntu 22.04
  • Installed Docker with snap

I follow Meta folly Github document to install packages but continue see following message:

  permission denied: '/usr/lib/python3.10/ ..

After search web I found solution from below link: forums.docker.com/t/bug-on-apt-install-perm..

Edit /var/snap/docker/current/config/daemon.json

Add "storage-driver" : "vfs"

{
    "storage-driver": "vfs"
}

Restart the Docker

sudo snap restart docker

Dockerfile

Most part same with Github document but I add libfmt-dev package. If you don't add that it will continue show Fmt::fmt not found error messages.

FROM ubuntu:22.04

RUN apt-get update && apt-get install libfmt-dev googletest libssl-dev apt-utils build-essential python3-dev git cmake sudo -y
RUN git clone https://github.com/facebook/folly.git &&\
  cd folly &&\
  sudo ./build/fbcode_builder/getdeps.py install-system-deps --recursive &&\
  mkdir _build &&\
  cd _build &&\
  cmake .. &&\
  make &&\
  make install

Hope this can help someone who also interested in Meta's open source projects.