-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
145 additions
and
127 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
# build docker images | ||
|
||
## build all images | ||
# Docker Images | ||
|
||
https://hub.docker.com/repositories/feuyeux | ||
|
||
| No. | Lang | Base Image | Server | Client | | ||
|:----|:-----------------------------|:---------------------------------------------------------------|:---------------------------------|:---------------------------------| | ||
| 1 | [C++](hello-grpc-cpp) | | feuyeux/grpc_server_cpp:1.0.0 | feuyeux/grpc_client_cpp:1.0.0 | | ||
| 2 | [Rust](hello-grpc-rust) | | feuyeux/grpc_server_rust:1.0.0 | feuyeux/grpc_client_rust:1.0.0 | | ||
| 3 | [Java](hello-grpc-java) | | feuyeux/grpc_server_java:1.0.0 | feuyeux/grpc_client_java:1.0.0 | | ||
| 4 | [Go](hello-grpc-go) | [golang:1.23-alpine](go_grpc.dockerfile) | feuyeux/grpc_server_go:1.0.0 | feuyeux/grpc_client_go:1.0.0 | | ||
| 5 | [C#](hello-grpc-csharp) | [mcr.microsoft.com/dotnet/runtime:8.0](csharp_grpc.dockerfile) | feuyeux/grpc_server_csharp:1.0.0 | feuyeux/grpc_client_csharp:1.0.0 | | ||
| 6 | [Python](hello-grpc-python) | | feuyeux/grpc_server_python:1.0.0 | feuyeux/grpc_client_python:1.0.0 | | ||
| 7 | [Node.js](hello-grpc-nodejs) | | feuyeux/grpc_server_nodejs:1.0.0 | feuyeux/grpc_client_nodejs:1.0.0 | | ||
| 8 | [Dart](hello-grpc-dart) | | feuyeux/grpc_server_dart:1.0.0 | feuyeux/grpc_client_dart:1.0.0 | | ||
| 9 | [Kotlin](hello-grpc-kotlin) | | feuyeux/grpc_server_kotlin:1.0.0 | feuyeux/grpc_client_kotlin:1.0.0 | | ||
| 10 | [Swift](hello-grpc-swift) | | feuyeux/grpc_server_swift:1.0.0 | feuyeux/grpc_client_swift:1.0.0 | | ||
| 11 | [PHP](hello-grpc-php) | | feuyeux/grpc_server_php:1.0.0 | feuyeux/grpc_client_php:1.0.0 | | ||
| 12 | [TypeScript](hello-grpc-ts) | | feuyeux/grpc_server_ts:1.0.0 | feuyeux/grpc_client_ts:1.0.0 | | ||
|
||
## Build | ||
|
||
```sh | ||
sh build.sh | ||
|
||
langs=(cpp rust java go csharp python nodejs dart kotlin swift php ts) | ||
lang=$langs[2] | ||
sh build_$lang.sh | ||
sh ${lang}_build.sh | ||
``` | ||
|
||
## push all images | ||
## Run | ||
|
||
```sh | ||
sh push.sh | ||
sh ${lang}_run_server.sh | ||
``` | ||
|
||
## verify | ||
```sh | ||
sh ${lang}_run_client.sh | ||
``` | ||
|
||
### clean all containers | ||
## Push | ||
|
||
```sh | ||
sh tools/clean_world.sh | ||
sh ${lang}_push.sh | ||
``` | ||
|
||
| No. | Lang | Server | Client | | ||
|:----|:-----------------------------|:---------------------------------|:---------------------------------| | ||
| 1 | [C++](hello-grpc-cpp) | feuyeux/grpc_server_cpp:1.0.0 | feuyeux/grpc_client_cpp:1.0.0 | | ||
| 2 | [Rust](hello-grpc-rust) | feuyeux/grpc_server_rust:1.0.0 | feuyeux/grpc_client_rust:1.0.0 | | ||
| 3 | [Java](hello-grpc-java) | feuyeux/grpc_server_java:1.0.0 | feuyeux/grpc_client_java:1.0.0 | | ||
| 4 | [Go](hello-grpc-go) | feuyeux/grpc_server_go:1.0.0 | feuyeux/grpc_client_go:1.0.0 | | ||
| 5 | [C#](hello-grpc-csharp) | feuyeux/grpc_server_csharp:1.0.0 | feuyeux/grpc_client_csharp:1.0.0 | | ||
| 6 | [Python](hello-grpc-python) | feuyeux/grpc_server_python:1.0.0 | feuyeux/grpc_client_python:1.0.0 | | ||
| 7 | [Node.js](hello-grpc-nodejs) | feuyeux/grpc_server_nodejs:1.0.0 | feuyeux/grpc_client_nodejs:1.0.0 | | ||
| 8 | [Dart](hello-grpc-dart) | feuyeux/grpc_server_dart:1.0.0 | feuyeux/grpc_client_dart:1.0.0 | | ||
| 9 | [Kotlin](hello-grpc-kotlin) | feuyeux/grpc_server_kotlin:1.0.0 | feuyeux/grpc_client_kotlin:1.0.0 | | ||
| 10 | [Swift](hello-grpc-swift) | feuyeux/grpc_server_swift:1.0.0 | feuyeux/grpc_client_swift:1.0.0 | | ||
| 11 | [PHP](hello-grpc-php) | feuyeux/grpc_server_php:1.0.0 | feuyeux/grpc_client_php:1.0.0 | | ||
| 12 | [TypeScript](hello-grpc-ts) | feuyeux/grpc_server_ts:1.0.0 | feuyeux/grpc_client_ts:1.0.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM golang:1.23-alpine AS server | ||
# https://hub.docker.com/_/golang | ||
COPY proto_server grpc-server | ||
COPY tls/server_certs /var/hello_grpc/server_certs | ||
COPY tls/client_certs /var/hello_grpc/client_certs | ||
ENTRYPOINT ["./grpc-server"] | ||
|
||
FROM golang:1.23-alpine AS client | ||
COPY proto_client grpc-client | ||
COPY tls/client_certs /var/hello_grpc/client_certs | ||
ENTRYPOINT ["./grpc-client"] |
2 changes: 1 addition & 1 deletion
2
docker/grpc-client-go.dockerfile → docker/go_grpc_client.dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.22-alpine | ||
FROM golang:1.23-alpine | ||
COPY proto_client grpc-client | ||
COPY tls/client_certs /var/hello_grpc/client_certs | ||
ENTRYPOINT ["./grpc-client"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
docker push feuyeux/grpc_server_go:1.0.0 | ||
docker push feuyeux/grpc_client_go:1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
cd "$( | ||
cd "$(dirname "$0")" >/dev/null 2>&1 | ||
pwd -P | ||
)/" || exit | ||
export CLIENT_NAME=grpc_client_go | ||
export CLIENT_IMG=feuyeux/$CLIENT_NAME:1.0.0 | ||
# if there's first argument, it's secure, otherwise insecure | ||
if [ "$1" = "secure" ]; then | ||
sh run_tls_client.sh | ||
else | ||
sh run_insecure_client.sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
cd "$( | ||
cd "$(dirname "$0")" >/dev/null 2>&1 | ||
pwd -P | ||
)/" || exit | ||
export SERVER_NAME=grpc_server_go | ||
export SERVER_IMG=feuyeux/$SERVER_NAME:1.0.0 | ||
# if there's first argument, it's secure, otherwise insecure | ||
if [ "$1" = "secure" ]; then | ||
sh run_tls_server.sh | ||
else | ||
sh run_insecure_server.sh | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.