-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
| run do | |
| @driver.get 'http://the-internet.herokuapp.com/hovers' | |
| an_avatar = @driver.find_element(class: 'figure') | |
| @driver.action.move_to(an_avatar).perform | |
| expect(@driver.find_element(class: 'figcaption').displayed?).to eql true | |
| end |
| body { | |
| background: #222; | |
| color: #e6e6e6; } | |
| a { | |
| color: #949494; } | |
| a:link, a:visited { | |
| color: #949494; } | |
| a:hover, a:active, a:focus { | |
| color: #c7c7c7; } |
| Failures: | |
| 1) Viewing a selective release quiz as the teacher on the assignments index page shows all the quizzes | |
| Failure/Error: expect(list_of_assignments).to include_text SelectiveRelease::Homework.quizzes.quiz_for_everyone.title | |
| NoMethodError: | |
| undefined method `[]' for nil:NilClass | |
| # ./spec/selenium/quizzes/quizzes_selective_release_spec.rb:19:in `block (4 levels) in <top (required)>' | |
| # ./spec/selenium/common.rb:82:in `block (2 levels) in <top (required)>' | |
| # ./spec/spec_helper.rb:34:in `block (3 levels) in <top (required)>' | |
| # ./spec/spec_helper.rb:32:in `block (2 levels) in <top (required)>' |
| code: | |
| ``` | |
| it 'should print an object reference' do | |
| puts SelectiveRelease::Homework.quizzes.quiz_for_everyone | |
| end | |
| ``` | |
| Failures: | |
| 1) Viewing a selective release quiz as the teacher on the assignments index page shows all the quizzes |
| class String | |
| def trim sep=/\s/ | |
| sep_source = sep.is_a?(Regexp) ? sep.source : Regexp.escape(sep) | |
| pattern = Regexp.new("\\A(#{sep_source})*(.*?)(#{sep_source})*\\z") | |
| self[pattern, 2] | |
| end | |
| end |
| require_relative '../../helpers/selective_release/selective_release_common' | |
| describe 'Viewing selective release assignments' do | |
| include_context 'selective release' | |
| let(:assignments) { SelectiveRelease::Homework::Assignments } | |
| let(:discussions) { SelectiveRelease::Homework::Discussions } | |
| let(:quizzes) { SelectiveRelease::Homework::Quizzes } | |
| context 'as the teacher' do |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
| Failures: | |
| 1) This is an example and it works | |
| Failure/Error: visit '/' | |
| Errno::ECONNREFUSED: | |
| Failed to open TCP connection to 127.0.0.1:4444 (Connection refused - connect(2) for "127.0.0.1" port 4444) | |
| # /home/docker/.gem/ruby/2.3.0/gems/selenium-webdriver-2.52.0/lib/selenium/webdriver/remote/http/default.rb:107:in `response_for' | |
| # /home/docker/.gem/ruby/2.3.0/gems/selenium-webdriver-2.52.0/lib/selenium/webdriver/remote/http/default.rb:58:in `request' | |
| # /home/docker/.gem/ruby/2.3.0/gems/selenium-webdriver-2.52.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call' |
| # To untrack a single file that has already been added/initialized to your | |
| # repository, i.e., stop tracking the file but not delete it from your system use: | |
| git rm --cached filename | |
| # To untrack every file that is now in your .gitignore: | |
| # First commit any outstanding code changes, and then, run this command: | |
| git rm -r --cached . |
| docker inspect -f '{{ json .NetworkSettings }}' $(docker inspect --format="{{.Id}}" $container_name) | python -mjson.tool |