Last active
January 21, 2021 16:44
-
-
Save emptymalei/926f5ad55b45fe1a4deb6638bb241af2 to your computer and use it in GitHub Desktop.
preload data into redis using python script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an experiment | |
# It is not working | |
FROM redis:4.0.2-alpine | |
RUN apk add --no-cache python3 py3-pip | |
RUN pip3 install click | |
RUN pip3 install redis | |
RUN mkdir app | |
COPY . /app | |
EXPOSE 80 | |
WORKDIR /app | |
ARG LUT_FILE_PATH=artifacts/lookup_table/ | |
ARG LUT_FILE_NAME=lookup_table.json | |
RUN cd /app | |
RUN echo $LUT_FILE_PATH$LUT_FILE_NAME | |
COPY $LUT_FILE_PATH$LUT_FILE_NAME . | |
RUN ls . | |
RUN redis-server --daemonize yes | |
RUN redis-cli ping | |
RUN python3 api/prepare_redis.py --lut $LUT_FILE_NAME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment