Skip to main content
added 320 characters in body
Source Link
valiano
  • 689
  • 5
  • 16

Unfortunately, g++ is the only package providing iostream and the standard C++ headers. You can confirm this by searching the Alpine Linux package index by contents:

https://pkgs.alpinelinux.org/contents?file=iostream&path=&name=&branch=v3.10&arch=x86_64

However, for keeping your image small, you could install the g++ package and just remove all g++ binariesexecutables from your final image, either by using a two-stage docker build or by sqashing the image after built, as described in: Lightweight GCC for Alpine.

Essentially, you should keep everything under /usr/include/c++ and /usr/lib. You can delete the gcc executable binaries under /usr/bin, as well as cc1plus under /usr/libexec/gcc.

Unfortunately, g++ is the only package providing iostream and the standard C++ headers. You can confirm this by searching the Alpine Linux package index by contents:

https://pkgs.alpinelinux.org/contents?file=iostream&path=&name=&branch=v3.10&arch=x86_64

However, for keeping your image small, you could install the g++ package and just remove all g++ binaries from your final image, either by using a two-stage docker build or by sqashing the image after built, as described in: Lightweight GCC for Alpine.

Unfortunately, g++ is the only package providing iostream and the standard C++ headers. You can confirm this by searching the Alpine Linux package index by contents:

https://pkgs.alpinelinux.org/contents?file=iostream&path=&name=&branch=v3.10&arch=x86_64

However, for keeping your image small, you could install the g++ package and just remove all g++ executables from your final image, either by using a two-stage docker build or by sqashing the image after built, as described in: Lightweight GCC for Alpine.

Essentially, you should keep everything under /usr/include/c++ and /usr/lib. You can delete the gcc executable binaries under /usr/bin, as well as cc1plus under /usr/libexec/gcc.

Source Link
valiano
  • 689
  • 5
  • 16

Unfortunately, g++ is the only package providing iostream and the standard C++ headers. You can confirm this by searching the Alpine Linux package index by contents:

https://pkgs.alpinelinux.org/contents?file=iostream&path=&name=&branch=v3.10&arch=x86_64

However, for keeping your image small, you could install the g++ package and just remove all g++ binaries from your final image, either by using a two-stage docker build or by sqashing the image after built, as described in: Lightweight GCC for Alpine.