mirror of https://github.com/grpc/grpc.git
commit
98554efb98
56 changed files with 897 additions and 171 deletions
@ -0,0 +1,35 @@ |
|||||||
|
// Copyright 2024 gRPC authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H |
||||||
|
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H |
||||||
|
|
||||||
|
#include <grpc/support/port_platform.h> |
||||||
|
|
||||||
|
#include "src/core/lib/gprpp/orphanable.h" |
||||||
|
#include "src/core/lib/transport/call_spine.h" |
||||||
|
|
||||||
|
namespace grpc_core { |
||||||
|
|
||||||
|
// CallDestination is responsible for the processing of a CallHandler.
|
||||||
|
// It might be a transport, the server API, or a subchannel on the client (for
|
||||||
|
// instance).
|
||||||
|
class CallDestination : public Orphanable { |
||||||
|
public: |
||||||
|
virtual void StartCall(CallHandler call_handler) = 0; |
||||||
|
}; |
||||||
|
|
||||||
|
} // namespace grpc_core
|
||||||
|
|
||||||
|
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H
|
@ -0,0 +1,41 @@ |
|||||||
|
// Copyright 2024 gRPC authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include <grpc/support/port_platform.h> |
||||||
|
|
||||||
|
#include "src/core/lib/transport/call_factory.h" |
||||||
|
|
||||||
|
#include "src/core/lib/debug/stats.h" |
||||||
|
#include "src/core/lib/resource_quota/resource_quota.h" |
||||||
|
|
||||||
|
namespace grpc_core { |
||||||
|
|
||||||
|
CallFactory::CallFactory(const ChannelArgs& args) |
||||||
|
: call_size_estimator_(1024), |
||||||
|
allocator_(args.GetObject<ResourceQuota>() |
||||||
|
->memory_quota() |
||||||
|
->CreateMemoryOwner()) {} |
||||||
|
|
||||||
|
Arena* CallFactory::CreateArena() { |
||||||
|
const size_t initial_size = call_size_estimator_.CallSizeEstimate(); |
||||||
|
global_stats().IncrementCallInitialSize(initial_size); |
||||||
|
return Arena::Create(initial_size, &allocator_); |
||||||
|
} |
||||||
|
|
||||||
|
void CallFactory::DestroyArena(Arena* arena) { |
||||||
|
call_size_estimator_.UpdateCallSizeEstimate(arena->TotalUsedBytes()); |
||||||
|
arena->Destroy(); |
||||||
|
} |
||||||
|
|
||||||
|
} // namespace grpc_core
|
@ -0,0 +1,56 @@ |
|||||||
|
// Copyright 2024 gRPC authors.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FACTORY_H |
||||||
|
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FACTORY_H |
||||||
|
|
||||||
|
#include <grpc/support/port_platform.h> |
||||||
|
|
||||||
|
#include "src/core/lib/channel/channel_args.h" |
||||||
|
#include "src/core/lib/gprpp/ref_counted.h" |
||||||
|
#include "src/core/lib/resource_quota/arena.h" |
||||||
|
#include "src/core/lib/transport/call_size_estimator.h" |
||||||
|
#include "src/core/lib/transport/call_spine.h" |
||||||
|
|
||||||
|
namespace grpc_core { |
||||||
|
|
||||||
|
// CallFactory creates calls.
|
||||||
|
class CallFactory : public RefCounted<CallFactory> { |
||||||
|
public: |
||||||
|
explicit CallFactory(const ChannelArgs& args); |
||||||
|
|
||||||
|
// Create an arena for a call.
|
||||||
|
// We do this as a separate step so that servers can create arenas without
|
||||||
|
// creating the call into it - in the case that we have a HTTP/2 rapid reset
|
||||||
|
// like attack this saves a lot of cpu time.
|
||||||
|
Arena* CreateArena(); |
||||||
|
// Destroy an arena created by CreateArena.
|
||||||
|
// Updates the call size estimator so that we always create arenas of about
|
||||||
|
// the right size.
|
||||||
|
void DestroyArena(Arena* arena); |
||||||
|
|
||||||
|
// Create a call. The call will be created in the given arena.
|
||||||
|
// It is the CallFactory's responsibility to ensure that the CallHandler
|
||||||
|
// associated with the call is eventually handled by something (typically a
|
||||||
|
// CallDestination, but this is not strictly required).
|
||||||
|
virtual CallInitiator CreateCall(ClientMetadataHandle md, Arena* arena) = 0; |
||||||
|
|
||||||
|
private: |
||||||
|
CallSizeEstimator call_size_estimator_; |
||||||
|
MemoryAllocator allocator_; |
||||||
|
}; |
||||||
|
|
||||||
|
} // namespace grpc_core
|
||||||
|
|
||||||
|
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FACTORY_H
|
@ -0,0 +1,23 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- | |
||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
<%include file="../../apt_get_basic.include"/> |
||||||
|
<%include file="../../ruby_3_0_deps.include"/> |
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1,23 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- | |
||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
<%include file="../../apt_get_basic.include"/> |
||||||
|
<%include file="../../ruby_3_1_deps.include"/> |
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1,23 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- | |
||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
<%include file="../../apt_get_basic.include"/> |
||||||
|
<%include file="../../ruby_3_2_deps.include"/> |
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1,23 @@ |
|||||||
|
%YAML 1.2 |
||||||
|
--- | |
||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
<%include file="../../apt_get_basic.include"/> |
||||||
|
<%include file="../../ruby_3_3_deps.include"/> |
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1,16 @@ |
|||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.0 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.0.5" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.0.5" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.5' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
@ -0,0 +1,16 @@ |
|||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.1 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.1.3" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.1.3" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.1.3' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
@ -0,0 +1,16 @@ |
|||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.2 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.2.0" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.2.0" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
@ -0,0 +1,16 @@ |
|||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.3 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.3.0" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.3.0" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.3.0' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
@ -0,0 +1,11 @@ |
|||||||
|
prefix=@CMAKE_INSTALL_PREFIX@ |
||||||
|
exec_prefix=@CMAKE_INSTALL_PREFIX@ |
||||||
|
libdir=@CMAKE_INSTALL_FULL_LIBDIR@ |
||||||
|
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ |
||||||
|
|
||||||
|
Name: UTF8 Range |
||||||
|
Description: Google's UTF8 Library |
||||||
|
Version: 1.0 |
||||||
|
Requires: absl_strings |
||||||
|
Libs: -L${libdir} -lutf8_validity -lutf8_range @CMAKE_THREAD_LIBS_INIT@ |
||||||
|
Cflags: -I${includedir} |
@ -1 +1 @@ |
|||||||
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0:c277dbca7dbd28ff6112cbc842ba3144c49266bd@sha256:9190da90a2a95eca1370cef64dcba7ddee9f59cc7487093da6711c1280a0b0f9 |
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0:dce91a018316b35b962e5fa576fded4775457077@sha256:be9dfa852af7fe5c700747bbad5b93d15c3f030ac980a107e98fc9b70fee6077 |
@ -0,0 +1 @@ |
|||||||
|
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_1:348a4b975f4d19772bb9a1a95fc03720f89edbc0@sha256:282a052275fa9e0378301d759f5febcc9f1ff0ebb702e536690cd4fed1a43904 |
@ -0,0 +1,84 @@ |
|||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
#================= |
||||||
|
# Basic C core dependencies |
||||||
|
|
||||||
|
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
build-essential \ |
||||||
|
autoconf \ |
||||||
|
libtool \ |
||||||
|
pkg-config \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# GCC |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
gcc \ |
||||||
|
g++ \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# libc6 |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
libc6 \ |
||||||
|
libc6-dbg \ |
||||||
|
libc6-dev \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# Tools |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
bzip2 \ |
||||||
|
curl \ |
||||||
|
dnsutils \ |
||||||
|
git \ |
||||||
|
lcov \ |
||||||
|
make \ |
||||||
|
strace \ |
||||||
|
time \ |
||||||
|
unzip \ |
||||||
|
wget \ |
||||||
|
zip \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
#================= |
||||||
|
# Setup git to access working directory across docker boundary. |
||||||
|
# This avoids the "fatal: detected dubious ownership in repository XYZ" |
||||||
|
# git error. |
||||||
|
|
||||||
|
RUN git config --global --add safe.directory '*' |
||||||
|
RUN git config --global protocol.file.allow always |
||||||
|
|
||||||
|
|
||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.1 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.1.3" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.1.3" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.1.3' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
||||||
|
|
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1 @@ |
|||||||
|
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_2:e9f8640c6bb80a029c65ed6ebdfddd9574a041e4@sha256:f1ba9030d7d7496a6ed42c0e1a9a2fe3204208e94983d7d4b6b4c7752042ed28 |
@ -0,0 +1,84 @@ |
|||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
#================= |
||||||
|
# Basic C core dependencies |
||||||
|
|
||||||
|
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
build-essential \ |
||||||
|
autoconf \ |
||||||
|
libtool \ |
||||||
|
pkg-config \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# GCC |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
gcc \ |
||||||
|
g++ \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# libc6 |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
libc6 \ |
||||||
|
libc6-dbg \ |
||||||
|
libc6-dev \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# Tools |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
bzip2 \ |
||||||
|
curl \ |
||||||
|
dnsutils \ |
||||||
|
git \ |
||||||
|
lcov \ |
||||||
|
make \ |
||||||
|
strace \ |
||||||
|
time \ |
||||||
|
unzip \ |
||||||
|
wget \ |
||||||
|
zip \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
#================= |
||||||
|
# Setup git to access working directory across docker boundary. |
||||||
|
# This avoids the "fatal: detected dubious ownership in repository XYZ" |
||||||
|
# git error. |
||||||
|
|
||||||
|
RUN git config --global --add safe.directory '*' |
||||||
|
RUN git config --global protocol.file.allow always |
||||||
|
|
||||||
|
|
||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.2 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.2.0" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.2.0" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
||||||
|
|
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
@ -0,0 +1 @@ |
|||||||
|
us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_3:c063f13c0987355593ce6bcf2123bb9717eeba35@sha256:a26d6bfe8f799ae817db0bd0280283c2cc9ea0f02174fe9a2cb0cd10d71d81f8 |
@ -0,0 +1,84 @@ |
|||||||
|
# Copyright 2024 gRPC authors. |
||||||
|
# |
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
# you may not use this file except in compliance with the License. |
||||||
|
# You may obtain a copy of the License at |
||||||
|
# |
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
# |
||||||
|
# Unless required by applicable law or agreed to in writing, software |
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
# See the License for the specific language governing permissions and |
||||||
|
# limitations under the License. |
||||||
|
|
||||||
|
FROM debian:10 |
||||||
|
|
||||||
|
#================= |
||||||
|
# Basic C core dependencies |
||||||
|
|
||||||
|
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
build-essential \ |
||||||
|
autoconf \ |
||||||
|
libtool \ |
||||||
|
pkg-config \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# GCC |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
gcc \ |
||||||
|
g++ \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# libc6 |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
libc6 \ |
||||||
|
libc6-dbg \ |
||||||
|
libc6-dev \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
# Tools |
||||||
|
RUN apt-get update && apt-get install -y \ |
||||||
|
bzip2 \ |
||||||
|
curl \ |
||||||
|
dnsutils \ |
||||||
|
git \ |
||||||
|
lcov \ |
||||||
|
make \ |
||||||
|
strace \ |
||||||
|
time \ |
||||||
|
unzip \ |
||||||
|
wget \ |
||||||
|
zip \ |
||||||
|
&& apt-get clean |
||||||
|
|
||||||
|
#================= |
||||||
|
# Setup git to access working directory across docker boundary. |
||||||
|
# This avoids the "fatal: detected dubious ownership in repository XYZ" |
||||||
|
# git error. |
||||||
|
|
||||||
|
RUN git config --global --add safe.directory '*' |
||||||
|
RUN git config --global protocol.file.allow always |
||||||
|
|
||||||
|
|
||||||
|
#================== |
||||||
|
# Ruby dependencies |
||||||
|
|
||||||
|
# Install rvm |
||||||
|
RUN apt-get update && apt-get install -y gnupg2 && apt-get clean |
||||||
|
RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
||||||
|
RUN \curl -sSL https://get.rvm.io | bash -s stable |
||||||
|
|
||||||
|
# Install Ruby 3.3 |
||||||
|
RUN apt-get update && apt-get install -y procps && apt-get clean |
||||||
|
RUN /bin/bash -l -c "rvm install ruby-3.3.0" |
||||||
|
RUN /bin/bash -l -c "rvm use --default ruby-3.3.0" |
||||||
|
RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" |
||||||
|
RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.3.0' >> ~/.bashrc" |
||||||
|
RUN /bin/bash -l -c "gem install bundler --no-document" |
||||||
|
|
||||||
|
|
||||||
|
# Define the default command. |
||||||
|
CMD ["bash"] |
Loading…
Reference in new issue