Skip to content

Instantly share code, notes, and snippets.



Last active Apr 26, 2016
What would you like to do?
# Getting Base Image
FROM alpine:latest
RUN apk update vim tmux git sudo perl automake cmake qt openssh
RUN apk add --no-cache --virtual update pcre-dev openssl-dev
RUN apk add --no-cache --virtual build-dependencies build-base curl
RUN apk add nginx
EXPOSE 80 443
# echo running
CMD ["echo", "running!"]
# Getting Base Image
FROM centos:6
# start install nginx
RUN yum update -y
RUN yum install -y vim
RUN yum install -y curl
RUN yum install -y epel-release
RUN yum install -y sendmail
RUN yum install -y cronie-noanacron
RUN yum install -y ntp
RUN rpm -ivh
RUN yum install -y nginx
RUN /etc/init.d/nginx start
RUN chkconfig nginx on
# start install mysql
RUN yum -y install mysql-server
RUN /etc/init.d/mysqld start
RUN chkconfig mysqld on
# start install php
RUN yum -y install php
RUN yum -y install php-mysql
# start install ssh
RUN yum install -y openssh-server
RUN yum install -y openssh-clients
RUN sed -ri 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config
RUN mkdir ~/.ssh
RUN chmod 700 ~/.ssh
RUN touch ~/.ssh/authorized_keys
RUN chmod 600 ~/.ssh/authorized_keys
# Port
EXPOSE 22 80 8080 3306
# echo running
CMD ["echo", "running!"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment