Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Binali Rustamov committed Dec 23, 2019
1 parent 2a5c8cb commit 1bb55a6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Dockerfile
**/*/
!PortainerClient/bin/Release/netcoreapp3.1/publish/
!PortainerClient/bin/release/netcoreapp3.1/linux-x64/publish/PortainerClient
11 changes: 3 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
FROM mcr.microsoft.com/dotnet/core/runtime:2.2.5-bionic

WORKDIR /app

COPY Rustamov.PortainerClient/bin/Release/netcoreapp2.2/publish/ .

RUN echo '#!/bin/bash\n dotnet /app/Rustamov.PortainerClient.dll "$@"' > /usr/bin/portainerctl && \
chmod +x /usr/bin/portainerctl
FROM alpine:3.7
WORKDIR /
COPY PortainerClient/bin/release/netcoreapp3.1/linux-x64/publish/PortainerClient /usr/bin/portainerctl
34 changes: 17 additions & 17 deletions PortainerClient/PortainerClient.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8</LangVersion>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\PortainerClient.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DocumentationFile>bin\Debug\PortainerClient.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\PortainerClient.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>bin\Release\PortainerClient.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.4.4" />
<PackageReference Include="RestSharp" Version="106.6.10" />
<PackageReference Include="YamlDotNet" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.4.4"/>
<PackageReference Include="RestSharp" Version="106.6.10"/>
<PackageReference Include="YamlDotNet" Version="8.0.0"/>
</ItemGroup>

</Project>
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# PortainerClient

# PortainerClient (portainerctl)
License: MIT
Console client for the Portainer written in C# :)
## Main information
Uses Portainer's API as described [here](https://app.swaggerhub.com/apis/deviantony/Portainer/1.23.0/).

How to use?
Just pull the docker image [binali/portainerctl](https://hub.docker.com/r/binali/portainerctl) and enjoy.
Just pull the docker image [dotnetnomads/portainerctl](https://hub.docker.com/r/dotnetnomads/portainerctl) and enjoy.

Can be used in CI/CD. For example in stack deployment stage.

Expand All @@ -17,3 +18,17 @@ For now client supports those operations:
- Inspect
- List
- Remove
## Dependencies
- McMaster.Extensions.CommandLineUtils - CMD commands API.
- RestSharp - REST API requests.
- YamlDotNet - used for pretty-print data.
## TODO
The list order doesn't provide information about priority :)
- [ ] CI/CD
- [ ] Windows / Chocolatey integration.
- [ ] Linux / apt/yum package.
- [ ] macOS / brew integration.
- [ ] Documentation :)
- [ ] Integration tests
- [ ] Implement more APIs :)

0 comments on commit 1bb55a6

Please sign in to comment.