AleksanderBoldyrev / JSON_Val

GNU General Public License v3.0
0 stars 0 forks source link

Can't build project #7

Closed SemenMartynov closed 6 years ago

SemenMartynov commented 6 years ago
 $ docker build -t validation-service https://raw.githubusercontent.com/AleksanderBoldyrev/JSON_Val/master/Dockerfile && docker run -t --rm -p 80:80 validation-service
Downloading build context from remote url: https://raw.githubusercontent.com/AleksanderBoldyrev/JSON_Val/master/Dockerfile    550 B
Sending build context to Docker daemon  2.56 kB
Step 1/8 : FROM alpine:3.2
3.2: Pulling from library/alpine
39f6979ffaf8: Pull complete 
Digest: sha256:c022d7c6d1762777977cc3efb3a0ac7b2a723d07fe9b9254851641b99b22412f
Status: Downloaded newer image for alpine:3.2
 ---> 3fa9f6bd8a5e
Step 2/8 : RUN apk --update add openjdk7-jre
 ---> Running in 4c4d764ae33d
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/57) Installing openjdk7-jre-lib (7.79.2.5.6-r0)
(2/57) Installing java-common (0.1-r0)
(3/57) Installing libxau (1.0.8-r0)
(4/57) Installing libxdmcp (1.1.2-r0)
(5/57) Installing libxcb (1.11-r0)
(6/57) Installing libx11 (1.6.3-r1)
(7/57) Installing alsa-lib (1.0.29-r0)
(8/57) Installing libffi (3.2.1-r2)
(9/57) Installing libintl (0.19.4-r1)
(10/57) Installing glib (2.44.0-r1)
(11/57) Installing atk (2.16.0-r0)
(12/57) Installing libxext (1.3.3-r0)
(13/57) Installing libxrender (0.9.9-r1)
(14/57) Installing expat (2.2.0-r0)
(15/57) Installing libpng (1.6.20-r0)
(16/57) Installing freetype (2.5.5-r1)
(17/57) Installing fontconfig (2.11.1-r2)
(18/57) Installing pixman (0.32.8-r0)
(19/57) Installing cairo (1.14.2-r0)
(20/57) Installing dbus-libs (1.8.16-r1)
(21/57) Installing avahi-libs (0.6.31-r7)
(22/57) Installing libgcc (4.9.2-r6)
(23/57) Installing gmp (6.0.0a-r0)
(24/57) Installing nettle (3.2-r0)
(25/57) Installing libtasn1 (4.5-r1)
(26/57) Installing p11-kit (0.23.1-r0)
(27/57) Installing gnutls (3.4.5-r1)
(28/57) Installing libstdc++ (4.9.2-r6)
(29/57) Installing cups-libs (2.0.3-r1)
(30/57) Installing libxml2 (2.9.4-r3)
(31/57) Installing shared-mime-info (1.4-r0)
(32/57) Installing hicolor-icon-theme (0.15-r0)
(33/57) Installing libjpeg-turbo (1.4.0-r0)
(34/57) Installing tiff (4.0.7-r2)
(35/57) Installing gdk-pixbuf (2.32.2-r1)
(36/57) Installing gtk-update-icon-cache (2.24.25-r0)
(37/57) Installing libxcomposite (0.4.4-r0)
(38/57) Installing libxfixes (5.0.1-r1)
(39/57) Installing libxcursor (1.1.14-r1)
(40/57) Installing libxdamage (1.1.4-r0)
(41/57) Installing libxi (1.7.4-r1)
(42/57) Installing libxrandr (1.4.2-r0)
(43/57) Installing libxft (2.3.2-r0)
(44/57) Installing graphite2 (1.2.4-r1)
(45/57) Installing harfbuzz (0.9.40-r1)
(46/57) Installing pango (1.36.8-r2)
(47/57) Installing gtk+2.0 (2.24.25-r0)
Executing gtk+2.0-2.24.25-r0.post-install
(48/57) Installing krb5-conf (1.0-r0)
(49/57) Installing libcom_err (1.42.13-r0)
(50/57) Installing keyutils-libs (1.5.9-r1)
(51/57) Installing libverto (0.2.5-r0)
(52/57) Installing krb5-libs (1.13.6-r0)
(53/57) Installing lcms2 (2.8-r0)
(54/57) Installing openjdk7-jre-base (7.79.2.5.6-r0)
(55/57) Installing libxtst (1.2.2-r1)
(56/57) Installing giflib (5.1.1-r2)
(57/57) Installing openjdk7-jre (7.79.2.5.6-r0)
Executing busybox-1.23.2-r1.trigger
Executing java-common-0.1-r0.trigger
Executing glib-2.44.0-r1.trigger
Executing shared-mime-info-1.4-r0.trigger
Executing gdk-pixbuf-2.32.2-r1.trigger
Executing gtk-update-icon-cache-2.24.25-r0.trigger
Executing pango-1.36.8-r2.trigger
OK: 118 MiB in 72 packages
 ---> 7eff16f4637b
Removing intermediate container 4c4d764ae33d
Step 3/8 : RUN apk add --no-cache bash git openssh
 ---> Running in 419ce19f9553
fetch http://dl-cdn.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/17) Installing ncurses-terminfo-base (5.9-r3)
(2/17) Installing ncurses-libs (5.9-r3)
(3/17) Installing readline (6.3.008-r0)
(4/17) Installing bash (4.3.33-r2)
(5/17) Installing run-parts (4.4-r0)
(6/17) Installing openssl (1.0.2k-r0)
(7/17) Installing lua5.2-libs (5.2.4-r0)
(8/17) Installing lua5.2 (5.2.4-r0)
(9/17) Installing ncurses-widec-libs (5.9-r3)
(10/17) Installing lua5.2-posix (33.3.1-r2)
(11/17) Installing ca-certificates (20161130-r0)
(12/17) Installing libssh2 (1.5.0-r1)
(13/17) Installing curl (7.52.1-r1)
(14/17) Installing pcre (8.38-r0)
(15/17) Installing git (2.4.11-r0)
(16/17) Installing openssh-client (6.8_p1-r9)
(17/17) Installing openssh (6.8_p1-r9)
Executing busybox-1.23.2-r1.trigger
Executing ca-certificates-20161130-r0.trigger
OK: 141 MiB in 89 packages
 ---> 9cd143422f1d
Removing intermediate container 419ce19f9553
Step 4/8 : WORKDIR /app
 ---> d264350bd7cd
Removing intermediate container 052feafc6f5b
Step 5/8 : ADD . /app
 ---> 5f202a48e129
Removing intermediate container 85b643906b4e
Step 6/8 : EXPOSE 80
 ---> Running in 300a1018d540
 ---> d34dc334b467
Removing intermediate container 300a1018d540
Step 7/8 : ENV NAME World
 ---> Running in 83fedeb6de40
 ---> 90bfb0cb3a4a
Removing intermediate container 83fedeb6de40
Step 8/8 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /ValidatingService.jar
 ---> Running in 529a78c398d9
 ---> f3f0fbd62b19
Removing intermediate container 529a78c398d9
Successfully built f3f0fbd62b19
Error: Unable to access jarfile /ValidatingService.jar
SemenMartynov commented 6 years ago

And even after cloning to disk:

$ docker build -t validation-service . && docker run -t --rm -p 80:80 validation-service
Sending build context to Docker daemon 862.7 kB
Step 1/8 : FROM alpine:3.2
 ---> 3fa9f6bd8a5e
Step 2/8 : RUN apk --update add openjdk7-jre
 ---> Using cache
 ---> 7eff16f4637b
Step 3/8 : RUN apk add --no-cache bash git openssh
 ---> Using cache
 ---> 9cd143422f1d
Step 4/8 : WORKDIR /app
 ---> Using cache
 ---> d264350bd7cd
Step 5/8 : ADD . /app
 ---> 0df55eea0b53
Removing intermediate container 4c8a2ce73bf3
Step 6/8 : EXPOSE 80
 ---> Running in 9a1ffed71150
 ---> 69c4a6dc1f2a
Removing intermediate container 9a1ffed71150
Step 7/8 : ENV NAME World
 ---> Running in 74ad4a993404
 ---> 4c2589f605d6
Removing intermediate container 74ad4a993404
Step 8/8 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /ValidatingService.jar
 ---> Running in 21ebe0175d76
 ---> 64e7d6679cb8
Removing intermediate container 21ebe0175d76
Successfully built 64e7d6679cb8
Error: Unable to access jarfile /ValidatingService.jar
AleksanderBoldyrev commented 6 years ago

Weird... will check

SemenMartynov commented 6 years ago

It should work this way, but it doesn't

$ docker build -t validation-service github.com/AleksanderBoldyrev/JSON_Val && docker run -t --rm -p 80:80 validation-service
Sending build context to Docker daemon 862.7 kB
Step 1/8 : FROM alpine:3.2
 ---> 3fa9f6bd8a5e
Step 2/8 : RUN apk --update add openjdk7-jre
 ---> Using cache
 ---> 7eff16f4637b
Step 3/8 : RUN apk add --no-cache bash git openssh
 ---> Using cache
 ---> 9cd143422f1d
Step 4/8 : WORKDIR /app
 ---> Using cache
 ---> d264350bd7cd
Step 5/8 : ADD . /app
 ---> be517795d3f4
Removing intermediate container 3d4e44d491b6
Step 6/8 : EXPOSE 80
 ---> Running in 5d3b08743f46
 ---> a3d3b1f68448
Removing intermediate container 5d3b08743f46
Step 7/8 : ENV NAME World
 ---> Running in 1189c47bdb34
 ---> c98c623bd80b
Removing intermediate container 1189c47bdb34
Step 8/8 : ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -jar /ValidatingService.jar
 ---> Running in cee2e19f9c78
 ---> 4aa77aa6b77e
Removing intermediate container cee2e19f9c78
Successfully built 4aa77aa6b77e
Error: Unable to access jarfile /ValidatingService.jar
SemenMartynov commented 6 years ago

Hi! Any news here?

AleksanderBoldyrev commented 6 years ago

I'm trying to run the app, but there is a problem with the path of generated jar. Today, I hope, I solve this issue

SemenMartynov commented 6 years ago

OK

$ docker build -t validation-service github.com/AleksanderBoldyrev/JSON_Val && docker run -t --rm -p 80:80 validation-service
Sending build context to Docker daemon 876.5 kB
Step 1/15 : FROM alpine:3.7
3.7: Pulling from library/alpine
2fdfe1cd78c2: Already exists 
Digest: sha256:ccba511b1d6b5f1d83825a94f9d5b05528db456d9cf14a1ea1db892c939cda64
Status: Downloaded newer image for alpine:3.7
 ---> e21c333399e0
Step 2/15 : ENV LANG C.UTF-8
 ---> Running in ee54efcb709a
 ---> ff59c56a3595
Removing intermediate container ee54efcb709a
Step 3/15 : RUN {       echo '#!/bin/sh';       echo 'set -e';      echo;       echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"';    } > /usr/local/bin/docker-java-home     && chmod +x /usr/local/bin/docker-java-home
 ---> Running in 57b1128c2517
 ---> 5c516efd6074
Removing intermediate container 57b1128c2517
Step 4/15 : ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
 ---> Running in 82ede85c47c8
 ---> 6a06eddb465b
Removing intermediate container 82ede85c47c8
Step 5/15 : ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
 ---> Running in 21a63937a5f6
 ---> ea708286f3f9
Removing intermediate container 21a63937a5f6
Step 6/15 : ENV JAVA_VERSION 8u151
 ---> Running in c1a4cfd13d23
 ---> 1fb0aaab2f73
Removing intermediate container c1a4cfd13d23
Step 7/15 : ENV JAVA_ALPINE_VERSION 8.151.12-r0
 ---> Running in 0007f4b574ad
 ---> 608285adc612
Removing intermediate container 0007f4b574ad
Step 8/15 : RUN set -x  && apk add --no-cache       openjdk8="$JAVA_ALPINE_VERSION"     && [ "$JAVA_HOME" = "$(docker-java-home)" ]
 ---> Running in c83c0efa6331
+ apk add --no-cache openjdk8=8.151.12-r0
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/40) Installing libffi (3.2.1-r4)
(2/40) Installing libtasn1 (4.12-r2)
(3/40) Installing p11-kit (0.23.2-r2)
(4/40) Installing p11-kit-trust (0.23.2-r2)
(5/40) Installing ca-certificates (20171114-r0)
(6/40) Installing java-cacerts (1.0-r0)
(7/40) Installing libxau (1.0.8-r2)
(8/40) Installing libbsd (0.8.6-r1)
(9/40) Installing libxdmcp (1.1.2-r4)
(10/40) Installing libxcb (1.12-r1)
(11/40) Installing libx11 (1.6.5-r1)
(12/40) Installing libxcomposite (0.4.4-r1)
(13/40) Installing libxext (1.3.3-r2)
(14/40) Installing libxi (1.7.9-r1)
(15/40) Installing libxrender (0.9.10-r2)
(16/40) Installing libxtst (1.2.3-r1)
(17/40) Installing alsa-lib (1.1.4.1-r2)
(18/40) Installing libbz2 (1.0.6-r6)
(19/40) Installing libpng (1.6.34-r1)
(20/40) Installing freetype (2.8.1-r2)
(21/40) Installing libgcc (6.4.0-r5)
(22/40) Installing giflib (5.1.4-r1)
(23/40) Installing libjpeg-turbo (1.5.2-r0)
(24/40) Installing libstdc++ (6.4.0-r5)
(25/40) Installing openjdk8-jre-lib (8.151.12-r0)
(26/40) Installing java-common (0.1-r0)
(27/40) Installing krb5-conf (1.0-r1)
(28/40) Installing libcom_err (1.43.7-r0)
(29/40) Installing keyutils-libs (1.5.10-r0)
(30/40) Installing libverto (0.3.0-r0)
(31/40) Installing krb5-libs (1.15.2-r1)
(32/40) Installing lcms2 (2.8-r1)
(33/40) Installing nspr (4.17-r0)
(34/40) Installing sqlite-libs (3.21.0-r0)
(35/40) Installing nss (3.34.1-r0)
(36/40) Installing pcsc-lite-libs (1.8.22-r0)
(37/40) Installing lksctp-tools (1.0.17-r0)
(38/40) Installing openjdk8-jre-base (8.151.12-r0)
(39/40) Installing openjdk8-jre (8.151.12-r0)
(40/40) Installing openjdk8 (8.151.12-r0)
Executing busybox-1.27.2-r6.trigger
Executing ca-certificates-20171114-r0.trigger
Executing java-common-0.1-r0.trigger
OK: 100 MiB in 51 packages
+ docker-java-home
+ [ /usr/lib/jvm/java-1.8-openjdk = /usr/lib/jvm/java-1.8-openjdk ]
 ---> 02b9ae7a95dd
Removing intermediate container c83c0efa6331
Step 9/15 : RUN apk update && apk add ca-certificates && update-ca-certificates && apk add openssl
 ---> Running in 96bbcf6a0a7b
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-35-g1f6e64f5d4 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-34-g4caa398901 [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9046 distinct packages available
OK: 100 MiB in 51 packages
WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
(1/3) Installing libcrypto1.0 (1.0.2n-r0)
(2/3) Installing libssl1.0 (1.0.2n-r0)
(3/3) Installing openssl (1.0.2n-r0)
Executing busybox-1.27.2-r6.trigger
Executing ca-certificates-20171114-r0.trigger
OK: 103 MiB in 54 packages
 ---> 848bb5b12925
Removing intermediate container 96bbcf6a0a7b
Step 10/15 : WORKDIR /app
 ---> 58024c46ee8d
Removing intermediate container e4b22ba935ca
Step 11/15 : ADD . /app
 ---> a0a5a0a349b7
Removing intermediate container 4cf59284e446
Step 12/15 : RUN chmod 777 run.sh
 ---> Running in b24f6a85230f
 ---> 5dbfdaacc3fa
Removing intermediate container b24f6a85230f
Step 13/15 : RUN chmod +x run.sh
 ---> Running in 779c0750f362
 ---> 78e2cea571dc
Removing intermediate container 779c0750f362
Step 14/15 : EXPOSE 80
 ---> Running in e45a0712ddfc
 ---> 8ef749044441
Removing intermediate container e45a0712ddfc
Step 15/15 : CMD /bin/sh /app/run.sh
 ---> Running in 4e7325ddf153
 ---> 0f54e292b01d
Removing intermediate container 4e7325ddf153
Successfully built 0f54e292b01d
Connecting to central.maven.org (151.101.84.209:80)
json-simple-1.1.jar  100% |*******************************************************************************************************************************************************************| 16046   0:00:00 ETA
./src/main/java/com/alex/Settings.java:3: warning: StringList is internal proprietary API and may be removed in a future release
import com.sun.org.apache.xerces.internal.xs.StringList;
                                            ^
Note: ./src/main/java/com/alex/Core.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
Creating server
Creating server thread
Trying to run server thread