Last active
July 1, 2024 02:00
-
-
Save mxyq/3b10efe8865cd9230583c2e98c907a6a to your computer and use it in GitHub Desktop.
[docker run] #Docker #Dockerfile
This file contains hidden or 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
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;"] |
This file contains hidden or 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
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