Skip to content

Instantly share code, notes, and snippets.

@kisel
Created January 5, 2014 20:18
Show Gist options
  • Save kisel/8273287 to your computer and use it in GitHub Desktop.
Save kisel/8273287 to your computer and use it in GitHub Desktop.
Install Opencart on docker container
#!/bin/sh
echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
apt-get update
apt-get install -y mysql-server curl apache2 git-core php5 php5-mysql php5-curl php5-gd php5-mcrypt
#dpkg-divert --local --rename --add /sbin/initctl
#ln -s /bin/true /sbin/initctl
git clone https://github.com/opencart/opencart.git /opt/opencart
cd /opt/opencart
git checkout v1.5.6.1
ln -s /opt/opencart/upload /var/www/opencart
cd /var/www/opencart
cp config-dist.php config.php
cp admin/config-dist.php admin/config.php
chmod 0777 image/
chmod 0777 image/cache/
chmod 0777 cache/
chmod 0777 download/
chmod 0777 config.php
chmod 0777 admin/config.php
chmod 0777 image/data/
chmod 0777 system/logs/
chmod 0777 system/cache/
mysqld &
mysql -u root <<END
CREATE USER 'opencart'@'localhost' IDENTIFIED BY 'myopencartpass';
CREATE DATABASE opencart;
GRANT ALL PRIVILEGES ON opencart.* TO 'opencart';
END
### open host and install
### remove
# rm -rf /var/www/opencart/install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment