Last active
August 29, 2015 14:16
-
-
Save icqparty/847543b7c726cca6b7cd to your computer and use it in GitHub Desktop.
Create docker conteiner radis-server
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
FROM ubuntu | |
CMD echo "hello" | |
MAINTAINER Asoskov Alexander "icqparty@gmail.com" | |
ENV SERVER_NAME rails-project | |
# turn on universe packages | |
RUN apt-get update | |
# basics | |
RUN apt-get install -y curl nano nodejs wget | |
# install RVM, Ruby, and Bundler | |
RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
RUN curl -sSL https://get.rvm.io | bash -s stable | |
RUN /bin/bash -l -c "rvm requirements" | |
RUN /bin/bash -l -c "rvm install 2.2.0" | |
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" | |
ADD ./ /var/www/project | |
WORKDIR /var/www/project | |
CMD ["bundle","install"] | |
EXPOSE 3000 | |
CMD ["rails","s"] | |
#1. docker build -t icqparty/rails --file Dockerfile-rails . | |
#2. docker run -t -i --name rails --link redis:db -d icqparty/rails |
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
FROM ubuntu | |
CMD echo "hello" | |
MAINTAINER Asoskov Alexander <icqparty@gmail.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/source | |
RUN apt-get update | |
RUN apt-get install -y redis-server mc nano | |
RUN service redis-server restart | |
CMD ["cd","~"] | |
CMD ["sed","-i", "'1s/^/your text\n/'",".bashrc"] | |
CMD ["/bin/bash", "-l"] | |
EXPOSE 6379 | |
#1.docker build -t icqparty/redis --file Dockerfile-redis . | |
#2.docker run -t -i --name redis -d <your username>/redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment