Last active
September 29, 2017 08:05
-
-
Save limboinf/84e15e0b880ecc35a582c6b32c9435f7 to your computer and use it in GitHub Desktop.
[Docker Ng Lua With China APT Source] #docekr #ng #lua
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
# vim: set shiftwidth=2 tabstop=2 softtabstop=-1 expandtab: | |
version: '2' | |
services: | |
nginx: | |
image: ng-lua:latest | |
volumes: | |
- /Users/xx/docker/static_web/nginx/nginx.conf:/etc/nginx/nginx.conf | |
- /Users/xx/docker/static_web/nginx/conf.d:/etc/nginx/conf.d | |
- /Users/xx/docker/static_web/nginx/html:/usr/share/nginx/html | |
- /Users/xx/docker/static_web/nginx/log:/var/log/nginx | |
ports: | |
- "8009:80" | |
environment: | |
- NGINX_PORT=80 |
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
# Version 0.0.1 | |
FROM ubuntu:14.04 | |
MAINTAINER Beginman "[email protected]" | |
ARG CHAINA_APT_SOURCE | |
RUN /bin/bash -c "if [[ ${CHAINA_APT_SOURCE} == ON ]];then sed -i 's#http://archive.ubuntu.com#http://mirrors.163.com#g' /etc/apt/sources.list; fi" | |
RUN apt-get update | |
RUN apt-get install -y lua5.1 | |
RUN apt-get install -y liblua5.1-dev | |
RUN apt-get install -y git | |
RUN apt-get install -y nginx | |
# docker不会自动打开端口,需显式告知要使用80端口 | |
EXPOSE 80 |
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
#!/bin/bash | |
docker build --build-arg CHAINA_APT_SOURCE=ON -t "ng-lua" . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment