makuhari-city / new-rousseau-machine_gen1

https://vote.metacity.jp/app/
4 stars 0 forks source link

`docker-compose up -d` is unreliable #17

Closed yasushisakai closed 3 years ago

yasushisakai commented 3 years ago

I have a high chance of getting this error when building locally.

=> ERROR [internal] load build context   
failed to solve: rpc error: code = Unknown desc = rpc error: code = Canceled desc = grpc: the client connection is closing

This occurs arbitrarily when supposedly transferring data to the VM. So sometimes it builds like there was nothing wrong..

One example of the entire error follows:

``` [+] Building 107.5s (13/23) => [internal] load build definition from Dockerfile 0.9s => => transferring dockerfile: 32B 0.9s => [internal] load .dockerignore 0.9s => => transferring context: 2B 0.9s => [internal] load metadata for docker.io/library/debian:buster-slim 1.6s => [internal] load metadata for docker.io/library/rust:1.51 1.7s => [auth] library/rust:pull token for registry-1.docker.io 0.0s => [auth] library/debian:pull token for registry-1.docker.io 0.0s => [stage-1 1/6] FROM docker.io/library/debian:buster-slim@sha256:c6e92d5b7730fdfc2753c4cce68c90d6c86a6a3391955549f9fe8ad6ce619ce0 0.0s => [builder 1/10] FROM docker.io/library/rust:1.51@sha256:180f72fd8e8b40ad6499e71d59e291f6cade96603ace1af82694b7292e5e3b49 0.0s => ERROR [internal] load build context 14.8s => => transferring context: 141.95MB 14.7s => CACHED [builder 2/10] RUN USER=root cargo new --bin dump 0.0s => CACHED [builder 3/10] WORKDIR ./dump 0.0s => CACHED [stage-1 2/6] RUN apt-get update && apt-get install -y ca-certificates tzdata && rm -rf /var/lib/apt/lists/* 0.0s => CACHED [stage-1 3/6] RUN groupadd appuser && useradd -g appuser appuser && mkdir -p /usr/src/app 0.0s ------ > [internal] load build context: ------ failed to solve: rpc error: code = Unknown desc = rpc error: code = Canceled desc = grpc: the client connection is closing ```
yasushisakai commented 3 years ago

fixed by separating building by make build, more on this: 9bc91891a9a3ea96fca737a3cc8644bab5255ad2