Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker failing to build #14

Closed
ole2k opened this issue Feb 18, 2022 · 7 comments
Closed

Docker failing to build #14

ole2k opened this issue Feb 18, 2022 · 7 comments

Comments

@ole2k
Copy link

ole2k commented Feb 18, 2022

I'm new to this, and have no idea what this means, can someone help? What can I do to get this working?

W: GPG error: https://deb.nodesource.com jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280

## Run `sudo apt-get install -y nodejs` to install Node.js 9.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn


Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  binutils build-essential cpp cpp-4.9 dpkg-dev fakeroot g++ g++-4.9 gcc
  gcc-4.9 gyp libalgorithm-diff-perl libalgorithm-diff-xs-perl
  libalgorithm-merge-perl libasan1 libatomic1 libc-ares-dev libc-ares2
  libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libdpkg-perl libfakeroot
  libfile-fcntllock-perl libgcc-4.9-dev libgomp1 libisl10 libitm1 libjs-jquery
  libjs-node-uuid libjs-underscore liblsan0 libmpc3 libmpfr4 libquadmath0
  libssl-dev libssl-doc libstdc++-4.9-dev libtimedate-perl libtsan0 libubsan0
  libv8-3.14-dev libv8-3.14.5 linux-libc-dev make manpages manpages-dev
  node-abbrev node-ansi node-ansi-color-table node-archy node-async
  node-block-stream node-combined-stream node-cookie-jar node-delayed-stream
  node-forever-agent node-form-data node-fstream node-fstream-ignore
  node-github-url-from-git node-glob node-graceful-fs node-gyp node-inherits
  node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime
  node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npmlog node-once node-osenv node-qs
  node-read node-read-package-json node-request node-retry node-rimraf
  node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
  node-underscore node-which python-pkg-resources zlib1g-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  nodejs-dev npm
The following packages will be upgraded:
  nodejs
1 upgraded, 0 newly installed, 2 to remove and 48 not upgraded.
Need to get 12.8 MB of archives.
After this operation, 56.8 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  nodejs
E: There are problems and -y was used without --force-yes
ERROR: Service 'grails' failed to build: The command '/bin/sh -c apt-get install -y curl     && curl -sL https://deb.nodesource.com/setup_9.x | bash -     && apt-get install -y nodejs     && curl -L https://www.npmjs.com/install.sh | sh' returned a non-zero code: 100
@EV0LV3
Copy link

EV0LV3 commented Mar 22, 2022

The docker files are outdate, last update 2 years ago. Still use NodeJS9 (is Eol). So think its not working anymore out of the box.
If you see in this post: #5 Its better they close it our update it.

@jmiranda
Copy link
Member

jmiranda commented Apr 9, 2022

hey @EV0LV3 and @ole2k Apologies. I don't use this repository myself so I've been hoping others would be able to keep it up-to-date. Unfortunatey, I also didn't see the PRs or issues that were created since I don't own the repository. But I'll try to do a better job maintaining this going forward.

@bborg-imsmalta
Copy link

What is this state as still giving similar errors

E: There are problems and -y was used without --force-yes
ERROR: Service 'grails' failed to build: The command '/bin/sh -c apt-get update                                             && apt-get install -y curl zip python g++ make gcc build-essential     && curl -                                            sL https://deb.nodesource.com/setup_13.x | bash -     && apt-get install -y node                                            js     && curl -L https://www.npmjs.com/install.sh | sh' returned a non-zero cod                                            e: 100

@jmiranda
Copy link
Member

jmiranda commented Jul 18, 2022

@bborg-imsmalta I'm currently running Ubuntu 18.04 on my laptop and don't encounter that error. What OS are you running? What command are you executing when you see that error?

Disregard. I've just encountered the issue myself. I'll investigate and get back to you.
docker-compose-up-build.log

@jmiranda
Copy link
Member

After some minimal investigation the obvious issue was that our Dockerfile was not able to authenticate the nodejs package.
nodesource/distributions#1181

## Running `apt-get update` for you...

+ apt-get update
Ign http://deb.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates InRelease
Hit http://deb.debian.org jessie-updates InRelease
Get:1 https://deb.nodesource.com jessie InRelease [4584 B]
Hit http://deb.debian.org jessie Release.gpg
Hit http://deb.debian.org jessie Release
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [992 kB]
Get:3 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Ign https://deb.nodesource.com jessie InRelease
Get:4 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Get:5 https://deb.nodesource.com jessie/main Sources [20 B]
Get:6 https://deb.nodesource.com jessie/main amd64 Packages [765 B]
Fetched 10.1 MB in 9s (1089 kB/s)
Reading package lists...
W: GPG error: https://deb.nodesource.com jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1655A0AB68576280

## Run `sudo apt-get install -y nodejs` to install Node.js 13.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn

Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded.
Need to get 24.3 MB of archives.
After this operation, 117 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  nodejs
E: There are problems and -y was used without --force-yes
ERROR: Service 'grails' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl zip python g++ make gcc build-essential     && curl -sL https://deb.nodesource.com/setup_13.x | bash -     && apt-get install -y nodejs     && curl -L https://www.npmjs.com/install.sh | sh' returned a non-zero code: 100

Adding the following line to the Dockerfile seems to have fixed the problem

# Install Base Packages required and Node
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN apt-get update && apt-get install -y curl zip python g++ make gcc build-essential \
    && curl -sL https://deb.nodesource.com/setup_13.x | bash - \
    && apt-get install -y nodejs \
    && curl -L https://www.npmjs.com/install.sh | sh

After that I ran the following commands

docker-compose down
docker-compose up --build

... and after a long while everything started up.

@jmiranda
Copy link
Member

If you encounter the following issue ...

grails_1  | React build finished
grails_1  | Running Grails application..
grails_1  | 2022-07-18 18:51:05,904 [main] INFO  context.ContextLoader  - Root WebApplicationContext: initialization started
grails_1  | 2022-07-18 18:51:05,906 [main] INFO  support.XmlWebApplicationContext  - Refreshing Root WebApplicationContext: startup date [Mon Jul 18 18:51:05 UTC 2022]; root of context hierarchy
grails_1  | 2022-07-18 18:51:05,918 [main] INFO  xml.XmlBeanDefinitionReader  - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
grails_1  | 2022-07-18 18:51:06,025 [main] INFO  support.DefaultListableBeanFactory  - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fa944e2: defining beans [grailsApplication,pluginManager,grailsConfigurator,grailsResourceLoader,grailsResourceHolder,characterEncodingFilter]; root of factory hierarchy
grails_1  | 2022-07-18 18:51:12,860 [MLog-Init-Reporter] INFO  log.MLog  - MLog clients using slf4j logging.
grails_1  | 2022-07-18 18:51:13,292 [main] ERROR context.GrailsContextLoader  - Error executing bootstraps: No such property: mergedConfig for class: org.codehaus.groovy.grails.commons.DefaultGrailsApplication
grails_1  | groovy.lang.MissingPropertyException: No such property: mergedConfig for class: org.codehaus.groovy.grails.commons.DefaultGrailsApplication
grails_1  | 	at Quartz2GrailsPlugin$_closure1.doCall(Quartz2GrailsPlugin.groovy:56)
grails_1  | 	at Quartz2GrailsPlugin$_closure1.doCall(Quartz2GrailsPlugin.groovy)
grails_1  | 	at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:723)
grails_1  | 	at grails.spring.BeanBuilder.beans(BeanBuilder.java:573)
grails_1  | 	at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:519)
grails_1  | 	at org.grails.tomcat.InlineExplodedTomcatServer.doStart(InlineExplodedTomcatServer.groovy:112)
grails_1  | 	at org.grails.tomcat.InlineExplodedTomcatServer$doStart.callCurrent(Unknown Source)
grails_1  | 	at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:97)
grails_1  | 	at grails.web.container.EmbeddableServer$start.call(Unknown Source)
grails_1  | 	at RunApp$_run_closure5_closure12.doCall(RunApp:158)
grails_1  | 	at RunApp$_run_closure5_closure12.doCall(RunApp)
grails_1  | 	at RunApp$_run_closure10.doCall(RunApp:280)
grails_1  | 	at RunApp$_run_closure10.call(RunApp)
grails_1  | 	at RunApp$_run_closure5.doCall(RunApp:149)
grails_1  | 	at RunApp$_run_closure5.call(RunApp)
grails_1  | 	at RunApp.runInline(RunApp:116)
grails_1  | 	at RunApp.this$4$runInline(RunApp)
grails_1  | 	at RunApp$_run_closure1.doCall(RunApp:59)
grails_1  | 	at RunApp$_run_closure1.doCall(RunApp.groovy:33)
grails_1  | 	at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
grails_1  | 	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
grails_1  | 	at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
grails_1  | 	at gant.Gant.withBuildListeners(Gant.groovy:427)
grails_1  | 	at gant.Gant.this$2$withBuildListeners(Gant.groovy)
grails_1  | 	at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
grails_1  | 	at gant.Gant.dispatch(Gant.groovy:415)
grails_1  | 	at gant.Gant.this$2$dispatch(Gant.groovy)
grails_1  | 	at gant.Gant.invokeMethod(Gant.groovy)
grails_1  | 	at gant.Gant.executeTargets(Gant.groovy:590)

... just run

docker-compose up 

The liquibase database migrations take a long time to execute so please be patient.

Pull request for the Dockerfile change will be created / merged as soon as possible.

@jmiranda
Copy link
Member

jmiranda added a commit that referenced this issue Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants