mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.31k stars 99 forks source link

Docker build fails #243

Closed wereHamster closed 3 years ago

wereHamster commented 3 years ago
$ docker build .
=== Building web (…/accent/Dockerfile)
[+] Building 32.8s (36/45)                                                                                                                                                                                                                                            
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                             0.5s
 => => transferring dockerfile: 37B                                                                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                                0.7s
 => => transferring context: 35B                                                                                                                                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/alpine:3.12.0                                                                                                                                                                                                 1.9s
 => [internal] load metadata for docker.io/gleamlang/gleam:0.13.2                                                                                                                                                                                                2.0s
 => [internal] load metadata for docker.io/hexpm/elixir:1.11.2-erlang-23.1.1-alpine-3.12.0                                                                                                                                                                       2.1s
 => [internal] load metadata for docker.io/library/node:14-alpine                                                                                                                                                                                                2.0s
 => [gleam-builder 1/6] FROM docker.io/gleamlang/gleam:0.13.2@sha256:81a788879f213f33008758408d8314e4a7e9868299c7403b7d588ebf1db89cbd                                                                                                                            0.0s
 => [internal] load build context                                                                                                                                                                                                                                0.4s
 => => transferring context: 126.55kB                                                                                                                                                                                                                            0.1s
 => [stage-4 1/7] FROM docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321                                                                                                                                   0.0s
 => [builder  1/18] FROM docker.io/hexpm/elixir:1.11.2-erlang-23.1.1-alpine-3.12.0@sha256:e0f85aebea9f7790ee05f447d6f92bfcad97915b9faa66e5b9f61d308ed1f8d3                                                                                                       0.0s
 => [webapp-builder 1/5] FROM docker.io/library/node:14-alpine@sha256:a75f7cc536062f9266f602d49047bc249826581406f8bc5a6605c76f9ed18e98                                                                                                                           0.0s
 => CACHED [stage-4 2/7] RUN apk --no-cache update &&     apk --no-cache upgrade &&     apk --no-cache add bash yaml-dev                                                                                                                                         0.0s
 => CACHED [stage-4 3/7] WORKDIR /opt/accent                                                                                                                                                                                                                     0.0s
 => CACHED [webapp-builder 2/5] RUN apk --no-cache update &&     apk --no-cache upgrade &&     apk --no-cache add git python make                                                                                                                                0.0s
 => CACHED [webapp-builder 3/5] WORKDIR /opt/build                                                                                                                                                                                                               0.0s
 => CACHED [webapp-builder 4/5] COPY webapp .                                                                                                                                                                                                                    0.0s
 => CACHED [builder  2/18] WORKDIR /build                                                                                                                                                                                                                        0.0s
 => CACHED [gleam-builder 2/6] WORKDIR /opt/build                                                                                                                                                                                                                0.0s
 => CACHED [gleam-builder 3/6] COPY gleam.toml .                                                                                                                                                                                                                 0.0s
 => CACHED [gleam-builder 4/6] COPY rebar.config .                                                                                                                                                                                                               0.0s
 => CACHED [gleam-builder 5/6] COPY src src                                                                                                                                                                                                                      0.0s
 => CACHED [gleam-builder 6/6] RUN rebar3 compile                                                                                                                                                                                                                0.0s
 => CACHED [builder  3/18] COPY --from=gleam-builder /opt/build ./gen                                                                                                                                                                                            0.0s
 => CACHED [builder  4/18] RUN apk --no-cache update &&     apk --no-cache upgrade &&     apk --no-cache add make g++ git yaml-dev                                                                                                                               0.0s
 => CACHED [builder  5/18] RUN mix local.rebar --force &&     mix local.hex --force                                                                                                                                                                              0.0s
 => CACHED [jipt-builder 4/5] COPY jipt .                                                                                                                                                                                                                        0.0s
 => CANCELED [webapp-builder 5/5] RUN npm ci --no-audit --no-color &&     npm run build-production                                                                                                                                                              29.2s
 => ERROR [jipt-builder 5/5] RUN npm ci --no-audit --no-color &&     npm run build-production                                                                                                                                                                   25.5s
 => [builder  6/18] COPY mix.* ./                                                                                                                                                                                                                                1.8s
 => [builder  7/18] COPY lib lib                                                                                                                                                                                                                                 1.2s
 => [builder  8/18] COPY priv priv                                                                                                                                                                                                                               0.9s
 => [builder  9/18] COPY config config                                                                                                                                                                                                                           0.8s
 => [builder 10/18] COPY mix.exs .                                                                                                                                                                                                                               0.8s
 => [builder 11/18] COPY mix.lock .                                                                                                                                                                                                                              0.7s
 => [builder 12/18] RUN mix deps.get --only prod                                                                                                                                                                                                                10.9s
 => CANCELED [builder 13/18] RUN mix deps.compile --only prod                                                                                                                                                                                                    9.8s
------                                                                                                                                                                                                                                                                
 > [jipt-builder 5/5] RUN npm ci --no-audit --no-color &&     npm run build-production:                                                                                                                                                                               
#38 13.55                                                                                                                                                                                                                                                             
#38 13.55 > deasync@0.1.19 install /opt/build/node_modules/deasync                                                                                                                                                                                                    
#38 13.55 > node ./build.js                                                                                                                                                                                                                                           
#38 13.55                                                                                                                                                                                                                                                             
#38 19.17 make: Entering directory '/opt/build/node_modules/deasync/build'                                                                                                                                                                                            
#38 19.17   CXX(target) Release/obj.target/deasync/src/deasync.o                                                                                                                                                                                                      
#38 19.17 make: g++: Command not found                                                                                                                                                                                                                                
#38 19.17 make: *** [deasync.target.mk:107: Release/obj.target/deasync/src/deasync.o] Error 127                                                                                                                                                                       
#38 19.17 make: Leaving directory '/opt/build/node_modules/deasync/build'                                                                                                                                                                                             
#38 19.17 gyp ERR! build error                                                                                                                                                                                                                                        
#38 19.17 gyp ERR! stack Error: `make` failed with exit code: 2                                                                                                                                                                                                       
#38 19.17 gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)                                                                                                                                       
#38 19.17 gyp ERR! stack     at ChildProcess.emit (events.js:315:20)                                                                                                                                                                                                  
#38 19.17 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)                                                                                                                                                                
#38 19.17 gyp ERR! System Linux 4.19.121-linuxkit                                                                                                                                                                                                                     
#38 19.17 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"                                                                                                                                    
#38 19.17 gyp ERR! cwd /opt/build/node_modules/deasync
#38 19.17 gyp ERR! node -v v14.16.0
#38 19.17 gyp ERR! node-gyp -v v5.1.0
#38 19.17 gyp ERR! not ok 
#38 19.18 Build failed
#38 19.18 npm ERR! code ELIFECYCLE
#38 19.18 npm ERR! errno 1
#38 19.19 npm ERR! deasync@0.1.19 install: `node ./build.js`
#38 19.19 npm ERR! Exit status 1
#38 19.19 npm ERR! 
#38 19.19 npm ERR! Failed at the deasync@0.1.19 install script.
#38 19.19 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#38 19.52 
#38 19.52 npm ERR! A complete log of this run can be found in:
#38 19.52 npm ERR!     /root/.npm/_logs/2021-03-18T06_30_22_425Z-debug.log
------
executor failed running [/bin/sh -c npm ci --no-audit --no-color &&     npm run build-production]: exit code: 1
 ▸    Error: docker build exited with Error: 1
simonprev commented 3 years ago

Docker build is maintained by a GitHub actions that automatically push to Docker Hub: https://hub.docker.com/r/mirego/accent/

Everything looks good so I will close this issue

Metuphysics commented 2 years ago

Evertng is ok just try different versions... Try different versions in dockerfile, like FROM node:14-slim or etc...