Google cloud cpp docker image. List of supported cpp libraries:
- BigQuery
- BigTable
- Spanner
- Pub/Sub
- Storage
To know about the google-could-cpp please, read the official document.
Pull the image from the docker index. This is the recommended method of installation as it is easier to update image. These builds are performed by the Docker Trusted Build service.
$ docker pull dockage/google-cloud-cpp:latest
Alternatively, you can build the image locally.
$ git clone https://github.com/dockage/google-cloud-cpp.git
$ cd google-cloud-cpp
$ docker build --tag="$USER/google-cloud-cpp" -f v1.20/ubuntu/20.04/Dockerfile .
This part got a copy of official documentation of the google-cloud-cpp installation page.
It depends on your building process tools, these flags are required in your C++ projects:
pkg-config storage_client --cflags
pkg-config storage_client --libs-only-L
pkg-config storage_client --libs-only-l
pkg-config bigtable_client --cflags
pkg-config bigtable_client --libs-only-L
pkg-config bigtable_client --libs-only-l
Command:
$ g++ my_program.cc -o my_program `pkg-config storage_client --cflags` `pkg-config storage_client --libs-only-L` `pkg-config storage_client --libs-only-l`
In CMake (document link):
cmake_minimum_required(VERSION 3.5)
find_package(google_cloud_cpp_common REQUIRED)
add_executable(my_program my_program.cc)
target_link_libraries(my_program google_cloud_cpp_common)
Makefile (document link):
GCS_CXXFLAGS := $(shell pkg-config storage_client --cflags)
GCS_CXXLDFLAGS := $(shell pkg-config storage_client --libs-only-L)
GCS_LIBS := $(shell pkg-config storage_client --libs-only-l)
my_storage_program: my_storage_program.cc
$(CXX) $(CXXFLAGS) $(GCS_CXXFLAGS) $(GCS_CXXLDFLAGS) -o $@ $^ $(GCS_LIBS)
CBT_CXXFLAGS := $(shell pkg-config bigtable_client --cflags)
CBT_CXXLDFLAGS := $(shell pkg-config bigtable_client --libs-only-L)
CBT_LIBS := $(shell pkg-config bigtable_client --libs-only-l)
my_bigtable_program: my_bigtable_program.cc
$(CXX) $(CXXFLAGS) $(CBT_CXXFLAGS) $(CBT_CXXLDFLAGS) -o $@ $^ $(CBT_LIBS)
You can also build your project outside, and then put the compiled file inside the container. Then you don't need to install the related tools anymore.
Before reporting your issue please try updating Docker to the latest version and check if it resolves the issue. Refer to the Docker installation guide for instructions.
If the above recommendations do not help then report your issue along with the following information:
- Output of the
docker vers6
anddocker info
commands. - The
docker run
command ordocker-compose.yml
used to start the image. Mask out the sensitive bits. - Please state if you are using Boot2Docker, VirtualBox, etc.
- Where to get help: website, documentation
- GitHub repo: dockage/google-cloud-cpp
- Where to file issues: GitHub issues
- Maintained by: The Dockage team (info at dockage.dev)
- License(s) - license, check 3rd party documentation for license information