Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 3 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
- name: Install Docker
run: curl https://get.docker.com | sh
- name: Install dependencies
run: |
bin/setup
sudo bin/setup
- name: Test misc
run: rspec spec/misc/*.rb
- name: Test Image
run: rspec spec/endpoints/image_spec.rb:1
- name: Test Image authentication
run: rspec spec/endpoints/image_spec.rb:196
continue-on-error: true
- name: Test Container
run: rspec spec/endpoints/container_spec.rb
- name: Test Volume
run: rspec spec/endpoints/volume_spec.rb
- name: Test Network
run: rspec spec/endpoints/network_spec.rb
- name: Test System
run: rspec spec/endpoints/system_spec.rb
- name: Test Exec
run: rspec spec/endpoints/exec_spec.rb
- name: Test Swarm
run: rspec spec/endpoints/swarm_spec.rb
- name: Test Node
run: rspec spec/endpoints/node_spec.rb
- name: Test Service
run: rspec spec/endpoints/service_spec.rb
- name: Test Task
run: rspec spec/endpoints/task_spec.rb
- name: Test Secret
run: rspec spec/endpoints/secret_spec.rb
- name: Test Config
run: rspec spec/endpoints/config_spec.rb
- name: Test Plugin
run: rspec spec/endpoints/plugin_spec.rb

run: bundle install
- name: Run unit tests
run: rspec
234 changes: 0 additions & 234 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
dockerapi (0.20.0)
dockerapi (0.20.1)
base64
excon (>= 0.97, < 2)

Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,29 @@ container = Docker::API::Container.new
# Create container
container.create( {name: "nginx"}, {Image: "nginx:latest", HostConfig: {PortBindings: {"80/tcp": [ {HostIp: "0.0.0.0", HostPort: "80"} ]}}})

# A more complex container creation
container.create(
{name: "nginx"},
{
Image: "nginx:latest",
HostConfig: {
PortBindings: {
"80/tcp": [ {HostIp: "0.0.0.0", HostPort: "80"} ]
}
},
Env: ["DOCKER=nice", "DOCKERAPI=awesome"],
Cmd: ["echo", "hello from test"],
Entrypoint: ["sh"],
NetworkingConfig: {
EndpointsConfig: {
EndpointSettings: {
IPAddress: "192.172.0.100"
}
}
}
}
)

# Start container
container.start("nginx")

Expand Down Expand Up @@ -563,13 +586,14 @@ The default blocks can be found in `Docker::API::Base`.

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Run `rake spec` to run the tests.

Run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

### Release new version

* Update CHANGELOG.
* Update README as needed.
* Update version.
* Run tests.
Expand Down
Empty file modified bin/console
100644 → 100755
Empty file.
31 changes: 0 additions & 31 deletions bin/setup

This file was deleted.

1 change: 0 additions & 1 deletion dockerapi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Gem::Specification.new do |spec|

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/nu12/dockerapi.git"
spec.metadata["changelog_uri"] = "https://github.com/nu12/dockerapi/blob/main/CHANGELOG.md"
spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/dockerapi"

# Specify which files should be added to the gem when it is released.
Expand Down
Loading