Running redis on nodejs Docker image

后端 未结 3 1461
野趣味
野趣味 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条回答
  •  被撕碎了的回忆
    2020-12-30 13:11

    If you are looking for a bare minimum docker with nodejs and redis-server, this works :

    FROM nikolaik/python-nodejs:python3.5-nodejs8
    
    RUN apt-get update
    apt-get -y install redis-server
    
    COPY . /app
    WORKDIR /app
    nohup redis-server &> redis.log &
    

    and then you can have further steps for your node application.

提交回复
热议问题