Skip to content

Instantly share code, notes, and snippets.

@mxyq
Last active July 1, 2024 02:00
Show Gist options
  • Save mxyq/3b10efe8865cd9230583c2e98c907a6a to your computer and use it in GitHub Desktop.
Save mxyq/3b10efe8865cd9230583c2e98c907a6a to your computer and use it in GitHub Desktop.
[docker run] #Docker #Dockerfile
FROM nginx:stable-alpine
ENV TimeZone=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone && export TZ=$TimeZone
ADD default.conf /etc/nginx/conf.d/
COPY --chown=nginx:nginx dist /usr/share/nginx/html
CMD ["nginx","-g","daemon off;"]
FROM redis:alpine
ENV TimeZone=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
COPY redis.conf /usr/local/etc/redis/redis.conf
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment