Skip to content

Instantly share code, notes, and snippets.

@limboinf
Last active September 29, 2017 08:05
Show Gist options
  • Save limboinf/84e15e0b880ecc35a582c6b32c9435f7 to your computer and use it in GitHub Desktop.
Save limboinf/84e15e0b880ecc35a582c6b32c9435f7 to your computer and use it in GitHub Desktop.
[Docker Ng Lua With China APT Source] #docekr #ng #lua
# 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
# Version 0.0.1
FROM ubuntu:14.04
MAINTAINER Beginman "xinxinyu2011@163.com"
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
#!/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