Running redis on nodejs Docker image

后端 未结 3 1478
野趣味
野趣味 2020-12-30 12:06

I have a Docker image which is a node.js application. The app retrieves some configuration value from Redis which is running locally. Because of that, I am trying to

3条回答
  •  梦毁少年i
    2020-12-30 13:10

    My use case was to add redis server in alpine tomcat flavour:

    So this worked:

    FROM tomcat:8.5.40-alpine
    
    
    RUN apk add --no-cache redis  
    RUN apk add --no-cache screen 
    
    EXPOSE 6379
    
    EXPOSE 3011
    
    
    ## Run Tomcat
    CMD screen -d -m -S Redis /usr/bin/redis-server --bind '0.0.0.0' && \
    ${CATALINA_HOME}/bin/catalina.sh run
    EXPOSE 8080
    

提交回复
热议问题