Running Shift for Docker

A growing number of users have requested the ability to run Shift locally. Whether for privacy reasons or a local Git server, you now have that option using Docker. With Docker, an environment can be created allowing you to run Shift directly on your local machine.

Not familiar with Docker? No worries. You'll be running Shift in three simple steps.

Download Docker

First, download the Docker Community Edition for your platform.

Build Shift

Next, build the Shift image by running the following command:

docker build -t shift https://laravelshift.com/resources/Dockerfile

This downloads the latest Dockerfile to create the environment for Shift. Depending on your network connection this may take a few minutes to build.

Run Shift

Now you can run Shift with the following command:

docker run -v /path/to/your/project:/project:delegated -e SHIFT_TOKEN=token shift

This will run the Shift Docker image you built. You will need to adjust the options.

  • The -v option creates a file mount between the Docker image and your project files. This is a colon separated value. You must replace the first segment with the full path to the folder containing your Laravel project. For example, this would be the path to the folder containing artisan.

  • The -e option sets an environment variable for Shift. In this case, the SHIFT_TOKEN must be set to the token you received when you purchased your Shift for Docker.

When this command finishes, your Shift is complete. There will be a shift.md file in your project root with detailed comments for any additional upgrade steps.

In the event of an error, a shift.log file will also be present. Feel free to message @laravelshift on Twitter or email shift@laravelshift.com for additional support.

Ready to upgrade? Chose any Shift to upgrade using Docker.