GCC Version inside Docker

May I know how to know the version of GCC installed inside a docker?

when I tried

cat /proc/version

It returned with

gcc version 4.2.0 20170510 (Ubuntu 4.2.0-6ubuntu1~14.04.12)

When I used

gcc -v

it returned

gcc version 7.2

I need to use GCC 7.2 inside my docker but I wonder why is it showing GCC 4.2 when I use cat /proc/version

1

1 Answer

The version in /proc/version is the version of the GCC compiler used to build your linux kernal of your host machine

The gcc -v is the version of the compiler installed in the docker container

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like