Dinky 0.73 Dockerfile make

reference:

Dinky: Real-time is the future, let Flink SQL enjoy silky smoothness--how to compile and run locally (rply.cn)

Dinky Introduction and Deployment (Docker Form)_HuaWei&&WeiHua's Blog-CSDN Blog

Dockerfile

FROM openjdk:8u342-oracle as build-stage

#Add and decompress to the opt directory
ADD ./dlink-release-0.7.3.tar.gz /opt/
COPY ./plugins/*.jar /opt/dlink-release-0.7.3/plugins
COPY ./application. yml /opt/dlink-release-0.7.3/config

USER root
RUN mv /opt/dlink-release-0.7.3 /opt/dinky/  && \
    mkdir -p /opt/dinky/run && mkdir -p /opt/dinky/logs &&  touch /opt/dinky/logs/dlink.log && \
    chmod -R 777 /opt/dinky/

FROM openjdk:8u342-oracle as production-stage
COPY --from=build-stage /opt/dinky/ /opt/dinky/
WORKDIR /opt/dinky/
RUN sed -i 's/jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA,/jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA,/g' /usr/java/openjdk-8/jre/lib/security/java.security
RUN sed -i 's/DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL,/DH keySize < 1024, EC keySize < 224, anon, NULL,/g' /usr/java/openjdk-8/jre/lib/security/java.security

EXPOSE 8888

CMD  ./auto.sh restart 1.14 && tail -f /opt/dinky/logs/dlink.log
 

application.yml

Need to modify the datasource configuration

spring:
  datasource:
    url: jdbc:mysql://${MYSQL_ADDR:127.0.0.1:3306}/dinky?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: dinky
    password: dinky
    driver-class-name: com.mysql.cj.jdbc.Driver
  application:
    name: dlink

docker build -t dinky-standalone-server:0.7.3-flink14 -f /opt/dockerfile/dinky/Dockerfile .

docker tag dinky-standalone-server:0.7.3-flink14 192.168.1.249:16443/bigdata/dinky-standalone-server:0.7.3-flink14

docker push 192.168.1.249:16443/bigdata/dinky-standalone-server:0.7.3-flink14

#Note: If you have mysql service, please execute the corresponding version of the SQL file. If your mysql address is 10.255.7.3 port is 33006, execute the command as follows

docker run --restart=always -d -p 8888:8888 -p 8081:8081 -e MYSQL_ADDR=10.255.7.3:3306 --name dinky dinky- standalone-server:0.7.3-flink14
replaced with your image file

docker save -o dinky-standalone-server.tar dinky-standalone-server:0.7.3-flink14

docker load -i /opt/dockerinstall/dinky/dinky-standalone-server.tar

docker ps -a shows all containers

docker rm dinky delete container

Delete the image docker rmi cba83a5d90b7

Guess you like

Origin blog.csdn.net/wangqiaowq/article/details/132077594