diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/01-install_docker.md b/01-install_docker.md index 3fb2c53..74e10a6 100644 --- a/01-install_docker.md +++ b/01-install_docker.md @@ -1,5 +1,5 @@ # Chapter 1: Installing Docker - +[**Return to the README here** ](https://github.com/rubyonracetracks/tutorial-docker-stretch) ## Procedure * Open a new terminal window. In SparkyLinux, go to Menu -> System Tools -> LXTerminal. * Install Git, the standard version control system. In the terminal window, enter the following command: @@ -30,3 +30,4 @@ rm -rf docker-64bit-debian-stretch-install ``` * Docker will be installed in a few minutes. In addition, other development software that you will need later is also installed, including KeePassX (for generating, encrypting, and storing passwords), Geany (code editor), SearchMonkey (search engine for local files), SQLite database browser (for viewing the SQLite database), and PG Admin (for viewing the PostgreSQL database). * Don't worry if the Docker installation process results in the message "Are you trying to connect to a TLS-enabled daemon without TLS?" This is normal. +[**Click here for Chapter 2** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/02-use_minimal_image.md) diff --git a/02-use_minimal_image.md b/02-use_minimal_image.md index 56457c9..fb7aec5 100644 --- a/02-use_minimal_image.md +++ b/02-use_minimal_image.md @@ -1,5 +1,5 @@ # Chapter 2: Using the Minimal Docker Image - +[** Click here for Chapter 1 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/01-install_docker.md) In this chapter, you will download the minimal Docker image, create a Docker container from it, and learn basic Docker capabilities. This minimal image is a basic building block for other images and does NOT come with Ruby on Rails installed. Because the minimal Docker image Using Ruby on Rails in Docker will be covered in later chapters. ## Topics Covered @@ -109,3 +109,5 @@ ls # The test1.txt file should be gone but the test2.txt file should remain ## Purpose of the Shared Directory * Placing the source code of your projects in the shared directory allows you to edit files with the GUI tools of your desktop Linux while processing and testing them with the software tools in your Docker container. * When you use a Docker container with pre-installed Ruby on Rails, you can test your Rails app in your Docker container and use the Geany editor (a GUI tool) to view and edit your source code files. You don't need any GUI tools in your Docker container, and you don't need Ruby on Rails in your desktop Linux setup. + +[** Click here for Chapter 3 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/03-use_dev_image.md) diff --git a/03-use_dev_image.md b/03-use_dev_image.md index 8aa5573..d5a591e 100644 --- a/03-use_dev_image.md +++ b/03-use_dev_image.md @@ -1,5 +1,5 @@ # Chapter 3: Using the Development Image - +[** Click here for Chapter 2 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/02-use_minimal_image.md) In this chapter, you will download the development Docker image and learn more of the basic capabilities of Docker. This development image is a derivative of the minimal image used in the previous chapter but has basic software development tools added, such as Git, Heroku, Node Version Manager, Node.js, Python, and rbenv. ## Topics Covered @@ -64,3 +64,4 @@ sh download_new_image.sh * Enter the command "sh nuke.sh". This removes all Docker containers and images. * Enter the command "docker ps -a". You'll see no Docker containers. * Enter the command "docker images -a". You'll see no Docker images. +[** Click here for Chapter 4 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/04-use_jekyll_image.md) diff --git a/04-use_jekyll_image.md b/04-use_jekyll_image.md index 87d7e09..8cf2023 100644 --- a/04-use_jekyll_image.md +++ b/04-use_jekyll_image.md @@ -1,5 +1,5 @@ # Chapter 4: Using the Jekyll Image - +[** Click here for Chapter 3 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/03-use_dev_image.md) In this chapter, you will use the jekyll-general Docker image. It's based on the development image but has a version of Ruby installed and a version of the Jekyll gem, which is used for creating static web sites. ## Topics @@ -80,3 +80,4 @@ There's Ruby on Racetracks, and there's Not Exactly. Make sure you choose the c * In the web browser in your desktop Linux, open the URL "localhost:4000". You should now see your Jekyll web page again, but you'll see the message that you just added to the index.md file added to the page. * In the Docker container, enter Ctrl-c to stop the Jekyll server. * Enter the command "exit". +[** Click here for Chapter 5 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/05-use_rails_image.md) diff --git a/05-use_rails_image.md b/05-use_rails_image.md index 0ed0ef7..f744607 100644 --- a/05-use_rails_image.md +++ b/05-use_rails_image.md @@ -1,5 +1,5 @@ # Chapter 5: Using the General Purpose Ruby on Rails Image - +[** Click here for Chapter 4 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/04-use_jekyll_image.md) In this chapter and the rest of the chapters in this tutorial, you will use the rails-general Docker image. It's based on the development image but includes Ruby, Rails, and other selected Ruby gems. ## Downloading the Image @@ -61,3 +61,4 @@ sh download_new_image.sh * Enter the command "rails -v". Now you'll see that Rails is back. * Enter the command "exit". * If you had deleted Ruby on Rails from a host system, it would take you hours to fully reinstall it. In the next chapter, you will create a very basic Ruby on Rails app. +[** Click here for Chapter 6 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/06-rails_app_sqlite.md) diff --git a/06-rails_app_sqlite.md b/06-rails_app_sqlite.md index 7f95862..5a20c0c 100644 --- a/06-rails_app_sqlite.md +++ b/06-rails_app_sqlite.md @@ -1,5 +1,5 @@ # Chapter 6: Quick Ruby on Rails App with SQLite - +[** Click here for Chapter 5 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/05-use_rails_image.md) In this chapter, you will create a quick Ruby on Rails app that uses SQLite for its database. ## Topics Covered @@ -28,3 +28,4 @@ In this chapter, you will create a quick Ruby on Rails app that uses SQLite for * In Docker, press Ctrl-C to stop the local server so that you can continue entering commands. * Enter the command "exit". * In the next chapter, you will create a basic Ruby on Rails app that uses PostgreSQL instead of SQLite as the database. +[** Click here for Chapter 7 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/07-rails_app_pg.md) diff --git a/07-rails_app_pg.md b/07-rails_app_pg.md index bb463a8..9a24330 100644 --- a/07-rails_app_pg.md +++ b/07-rails_app_pg.md @@ -1,5 +1,5 @@ # Chapter 7: Quick Ruby on Rails App with PostgreSQL - +[** Click here for Chapter 6 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/06-rails_app_sqlite.md) ## Topics * Creating a new Rails app that uses PostgreSQL for the database * Viewing the Rails app in your web browser @@ -32,3 +32,4 @@ * Exit pgAdmin. * In Docker, press Ctrl-C to stop the local server so that you can continue entering commands. * Enter the command "exit". +[** Click here for Chapter 8 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/08-rails_tutorial_sampleapp.md) diff --git a/08-rails_tutorial_sampleapp.md b/08-rails_tutorial_sampleapp.md index c9a97ae..19c9890 100644 --- a/08-rails_tutorial_sampleapp.md +++ b/08-rails_tutorial_sampleapp.md @@ -1,5 +1,5 @@ # Chapter 8: Rails Tutorial Sample App - +[** Click here for Chapter 7 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/07-rails_app_pg.md) In this chapter, you will download and run Michael Hartl's Rails Tutorial Sample App. You will learn to use tmux. In the interest of saving time, the rails-general Docker image comes preinstalled with the latest version of Ruby and the versions of the rails, pg, and nokogiri gems specified in the Rails Tutorial Sample App. ## What's the point? @@ -74,3 +74,4 @@ rails db:migrate:reset; rails db:seed * Congratulations! You now understand how to use Docker under the Ruby on Racetracks way. * For every Rails project that I'm on, I provide a custom Docker image that includes the correct versions of Ruby, the Rails gem, and certain other gems. This makes the setup process much faster and shorter. * In my tutorials involving specific projects, you will use the offset values for the port numbers. Thus, the port numbers of a Rails project will be different from the ones used in this chapter. Using a different offset value for different Docker containers allows you to run multiple Docker containers simultaneously. If a Docker container you are running uses any ports, trying to start a second Docker container will lead to error messages due to the conflict. +[** Return to the README here ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch) diff --git a/README.md b/README.md index 15ca4aa..9115686 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Welcome to the Docker Tutorial of [Ruby on Racetracks](http://www.rubyonracetrac ## Prerequisites * You should have version 4 of SparkyLinux installed as your host OS or virtual OS. You may also use any other Linux distro based on Debian Stretch. * If you are using a Mac or Windows, you can use a VirtualBox virtual machine with SparkyLinux on it. For more details, go through my [VirtualBox Tutorial](https://github.com/rubyonracetracks/tutorial_virtualbox). +[** Click here for Chapter 1 ** ](https://github.com/rubyonracetracks/tutorial-docker-stretch/blob/master/01-install_docker.md) ## FAQ Go to http://www.rubyonracetracks.com/faq-docker.html .