Bonjour à tous,

Je suis sur une API Web et débute dans le domaine....

J'ai plus ou moins suivi ce tutoriel: https://stackabuse.com/dockerizing-a...ot-application

J'ai suivi la 2eme méthode afin de dockeriser mon API automatiquement avec Maven via le pom.xml.

J'ai ensuite copier la méthode de ce projet : https://github.com/jirkapinkas/sprin...docker-compose
qui semble se rapprocher le plus de la 2eme méthode.


Voici le soucis que je rencontre (ligne 150):

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
 
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker$ mvn clean install -DskipTests=true
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< com.praline40:meetzicker >----------------------
[INFO] Building meetzicker 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ meetzicker ---
[INFO] Deleting /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ meetzicker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ meetzicker ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 70 source files to /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ meetzicker ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ meetzicker ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ meetzicker ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ meetzicker ---
[INFO] Building jar: /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target/meetzicker.jar
[INFO] 
[INFO] --- spring-boot-maven-plugin:2.3.4.RELEASE:repackage (repackage) @ meetzicker ---
[INFO] Replacing main artifact with repackaged archive
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ meetzicker ---
[INFO] Installing /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target/meetzicker.jar to /home/jules/.m2/repository/com/praline40/meetzicker/0.0.1-SNAPSHOT/meetzicker-0.0.1-SNAPSHOT.jar
[INFO] Installing /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/pom.xml to /home/jules/.m2/repository/com/praline40/meetzicker/0.0.1-SNAPSHOT/meetzicker-0.0.1-SNAPSHOT.pom
[INFO] 
[INFO] --- docker-maven-plugin:0.20.1:build (build) @ meetzicker ---
[INFO] Reading assembly descriptor: /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker/assembly.xml
[INFO] Copying files to /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target/docker/meetzicker/build/maven
[INFO] Building tar: /home/jules/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/target/docker/meetzicker/tmp/docker-build.tar
[INFO] DOCKER> [meetzicker:latest]: Created docker-build.tar in 95 milliseconds
[INFO] DOCKER> [meetzicker:latest]: Built image sha256:3befc
[INFO] DOCKER> [meetzicker:latest]: Removed old image sha256:29689
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.100 s
[INFO] Finished at: 2021-07-16T00:20:47+02:00
[INFO] ------------------------------------------------------------------------
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker$ cd src/main/docker
jules@jules-MS-7B51:~/Documents/MeetZicker/BACK/MeetZicker/MeetZicker/src/main/docker$ docker-compose up
Creating network "meetzicker_default" with the default driver
Creating meetzicker_db_1 ... done
Creating meetzicker_meetzicker_1 ... done
Attaching to meetzicker_db_1, meetzicker_meetzicker_1
db_1          | The files belonging to this database system will be owned by user "postgres".
db_1          | This user must also own the server process.
db_1          | 
db_1          | The database cluster will be initialized with locale "en_US.utf8".
db_1          | The default database encoding has accordingly been set to "UTF8".
db_1          | The default text search configuration will be set to "english".
db_1          | 
db_1          | Data page checksums are disabled.
db_1          | 
db_1          | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1          | creating subdirectories ... ok
db_1          | selecting default max_connections ... 100
db_1          | selecting default shared_buffers ... 128MB
db_1          | selecting default timezone ... UTC
db_1          | selecting dynamic shared memory implementation ... posix
db_1          | creating configuration files ... ok
meetzicker_1  | wait-for-it.sh: waiting 15 seconds for db:5432
db_1          | running bootstrap script ... ok
db_1          | performing post-bootstrap initialization ... sh: locale: not found
db_1          | No usable system locales were found.
db_1          | Use the option "--debug" to see details.
db_1          | ok
db_1          | syncing data to disk ... ok
db_1          | 
db_1          | Success. You can now start the database server using:
db_1          | 
db_1          |     pg_ctl -D /var/lib/postgresql/data -l logfile start
db_1          | 
db_1          | 
db_1          | WARNING: enabling "trust" authentication for local connections
db_1          | You can change this by editing pg_hba.conf or using the option -A, or
db_1          | --auth-local and --auth-host, the next time you run initdb.
db_1          | waiting for server to start....LOG:  database system was shut down at 2021-07-15 22:21:13 UTC
db_1          | LOG:  MultiXact member wraparound protections are now enabled
db_1          | LOG:  database system is ready to accept connections
db_1          | LOG:  autovacuum launcher started
db_1          |  done
db_1          | server started
db_1          | CREATE DATABASE
db_1          | 
db_1          | 
db_1          | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1          | 
db_1          | waiting for server to shut down....LOG:  received fast shutdown request
db_1          | LOG:  aborting any active transactions
db_1          | LOG:  autovacuum launcher shutting down
db_1          | LOG:  shutting down
db_1          | LOG:  database system is shut down
db_1          |  done
db_1          | server stopped
db_1          | 
db_1          | PostgreSQL init process complete; ready for start up.
db_1          | 
db_1          | LOG:  database system was shut down at 2021-07-15 22:21:14 UTC
db_1          | LOG:  MultiXact member wraparound protections are now enabled
db_1          | LOG:  database system is ready to accept connections
db_1          | LOG:  autovacuum launcher started
db_1          | LOG:  incomplete startup packet
meetzicker_1  | wait-for-it.sh: db:5432 is available after 3 seconds
meetzicker_1  | 
meetzicker_1  |   .   ____          _            __ _ _
meetzicker_1  |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
meetzicker_1  | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
meetzicker_1  |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
meetzicker_1  |   '  |____| .__|_| |_|_| |_\__, | / / / /
meetzicker_1  |  =========|_|==============|___/=/_/_/_/
meetzicker_1  |  :: Spring Boot ::        (v2.3.4.RELEASE)
meetzicker_1  | 
meetzicker_1  | 2021-07-15 22:21:16.485  INFO 22 --- [           main] c.p.MeetZicker.MeetZickerApplication     : Starting MeetZickerApplication v0.0.1-SNAPSHOT on 2998ed18004f with PID 22 (/meetzicker/meetzicker.jar started by root in /meetzicker)
meetzicker_1  | 2021-07-15 22:21:16.487  INFO 22 --- [           main] c.p.MeetZicker.MeetZickerApplication     : The following profiles are active: dev
meetzicker_1  | 2021-07-15 22:21:16.916  INFO 22 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
meetzicker_1  | 2021-07-15 22:21:16.983  INFO 22 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 61ms. Found 12 JPA repository interfaces.
meetzicker_1  | 2021-07-15 22:21:17.345  INFO 22 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
meetzicker_1  | 2021-07-15 22:21:17.352  INFO 22 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
meetzicker_1  | 2021-07-15 22:21:17.352  INFO 22 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
meetzicker_1  | 2021-07-15 22:21:17.390  INFO 22 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
meetzicker_1  | 2021-07-15 22:21:17.390  INFO 22 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 875 ms
meetzicker_1  | 2021-07-15 22:21:17.488  INFO 22 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
meetzicker_1  | 2021-07-15 22:21:17.519  INFO 22 --- [         task-1] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
meetzicker_1  | 2021-07-15 22:21:17.576  INFO 22 --- [         task-1] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.21.Final
meetzicker_1  | 2021-07-15 22:21:17.702  INFO 22 --- [         task-1] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
meetzicker_1  | 2021-07-15 22:21:17.770  INFO 22 --- [         task-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
meetzicker_1  | 2021-07-15 22:21:17.815  INFO 22 --- [         task-1] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Driver does not support get/set network timeout for connections. (Method org.postgresql.jdbc.PgConnection.getNetworkTimeout() is not yet implemented.)
meetzicker_1  | 2021-07-15 22:21:17.826  INFO 22 --- [         task-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
meetzicker_1  | 2021-07-15 22:21:17.839  INFO 22 --- [         task-1] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
db_1          | ERROR:  relation "concert" does not exist
db_1          | STATEMENT:  alter table concert drop constraint FKjxsg9xpq5ke5ayl2bfsepco7q
meetzicker_1  | 2021-07-15 22:21:18.395  WARN 22 --- [         task-1] o.h.t.s.i.ExceptionHandlerLoggedImpl     : GenerationTarget encountered exception accepting command : Error executing DDL "alter table concert drop constraint FKjxsg9xpq5ke5ayl2bfsepco7q" via JDBC Statement
meetzicker_1  | 
meetzicker_1  | org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "alter table concert drop constraint FKjxsg9xpq5ke5ayl2bfsepco7q" via JDBC Statement
meetzicker_1  |         at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67) ~[hibernate-core-5.4.21.Final.jar!/:5.4.21.Final]