Skip to content

Instantly share code, notes, and snippets.

@zbal
Created September 27, 2013 06:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbal/6724907 to your computer and use it in GitHub Desktop.
Save zbal/6724907 to your computer and use it in GitHub Desktop.
base Dockerfile
FROM ubuntu:precise
MAINTAINER me@example.com
# Prepare chinese apt mirror - upgrade to latest
RUN printf "deb http://mirrors.163.com/ubuntu precise main\ndeb http://mirrors.163.com/ubuntu/ precise universe\n" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
# Cheat upstart
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
# Install base packages
RUN apt-get install -y \
inetutils-ping \
net-tools \
vim \
git \
sudo \
openssh-server \
ssh \
screen \
htop \
dstat \
telnet
# For sshd
RUN mkdir /var/run/sshd
# Set default root pass
RUN yes some_passwd | passwd
# Network binding
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
@JoseCage
Copy link

JoseCage commented Nov 7, 2016

Hi @zbal this script can be used to create a ubuntu docker env?

@JoseCage
Copy link

JoseCage commented Nov 7, 2016

I want to create one docker container that use use a custom image of Ubuntu (where i have everything i need) and this container will look like homestead for laravel but my idea is not for laravel exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment