我有一个Java脚本
树是
App.jar
Data/files.txt
Move
场景:
本地。在主机中安装postgres并在其存储在postgres中的主机中运行jar,然后移至目标文件夹
如果我在docker中运行它不起作用,而仅显示成功连接的postgres数据库
Dockerfile
FROM openjdk:8
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD ["java", "-jar", "cdrt.jar"]
我为他们运行docker-compose
postgres
pgadmin
java-console
java-console
在我的主机上安装到用户目录下的/usr/src/myapp
我全部居住3
有人可以帮我吗?
docker-compose日志-f java
java-console | Connected to the PostgreSQL server successfully.
java-console | timer alrady set
java-console | ERROR: could not open file "/home/app/doc/kyc/kyc_sample.txt" for reading: No such file or directory
java-console | Hint: COPY FROM instructs the PostgreSQL server process to read a file. You may want a client-side facility such as psql's \copy.
java-console | Where: SQL statement "COPY cdr_kYC (
java-console | CUSTOMER_PROFILE_ID ,
java-console | msisdn ,
java-console | NATIONAL_ID ,
java-console | CUSTOMER_NAME ,
java-console | GENDER ,
java-console | DATE_OF_BIRTH ,
java-console | TRANSACTION_ID ,
java-console | PERMANENT_DISTRICT ,
java-console | PERMANENT_THANA ,
java-console | PERMANENT_ADDRESS ,
java-console | PRESENT_DISTRICT,
java-console | PRESENT_THANA ,
java-console | PRESENT_ADDRESS ,
java-console | CUSTOMER_EMAIL,
java-console | ENTRY_TYPE ,
java-console | SUBMIT_TIME ,
java-console | VERSION_TYPE
java-console | ) FROM '/home/app/doc/kyc/kyc_sample.txt'DELIMITER '|' CSV HEADER"
java-console | PL/pgSQL function cdr_kyc_record(text) line 31 at EXECUTE