如何使用DockStation管理Docker容器?

作者:Jack Wallen  编译:沈建苗

如果您寻找一个GUI工具来管理Docker容器,会发现选择远比想象的多。这些工具有的过于简单,有的异常复杂。然而,您时不时会发现某个桌面客户软件在简化容器管理方面做得非常出色。

DockStation就是这样一个GUI工具,它适用于Linux、macOS和Windows,可供个人和初创公司免费使用。DockStation具有以下功能:

•管理服务和容器

•向后兼容

•统计数字、端口和日志监控

•项目创建

•内置解析器

•观察器

•将镜像拖放到项目中

•支持Docker Compose

DockStation方面要注意的一个地方是,虽然它让您可以在 localhost(安装该应用程序的机器)上构建和管理项目,但面对远程主机,您无法构建项目。不过您可以使用远程连接的 Docker服务器做很多事。

不妨先安装DockStation,在本地机器上构建我们的第一个项目,然后将其连接到远程机器。我将在Pop!_OS Linux上进行演示,连接到已安装Docker的Ubuntu Server的远程实例。

如何安装DockStation?

DockStation的安装很简单。要做的头一件事是下载与操作系统兼容的安装程序文件。由于我使用基于Debian的发行版,于是将从DockStation下载页面(https://dockstation.io/)下载.deb文件。将该文件保存到~/Downloads 目录,然后打开终端窗口。

从终端使用以下命令安装 DockStation:

sudo dpkg -i ~/Downloads/dockstation*.deb

如果安装出错,使用该命令解决问题:

sudo apt-get install -f

一旦安装完毕,您就可以启动该应用程序了。

启动DockStation并登录

启动DockStation,然后在登录窗口(图 1)中注册Google或GitHub,或者点击立即注册,按照提示创建一个帐户。

图1:为DockStation创建一个帐户。

一旦成功验证,您将看到一个空的项目选项卡(图 2)。

图2:DockStation已准备好让您创建第一个项目。

点击+以创建新项目。在出现的窗口(图3)中,为项目命名,然后设置存放项目文件和文件夹的路径。

图3:在DockStation中创建新项目。

填写完所需信息后,点击CREATE添加新项目。

不妨构建一个WordPress项目。在搜索文件中键入WordPress,然后出现官方镜像(图 4)时,将其从中心列拖到右侧。

图4:WordPress镜像可在DockStation中使用。

等待版本填充完毕,然后从下拉列表中选择标记为latest的镜像。点击确定,该镜像将被添加上去。接下来,点击与该镜像关联的齿轮图标,您可以编辑服务,以完全满足自己的需求(图 5)。

图5:您可以在这里编辑常规、启动、音量和端口等选项。

完成配置后,点击确定,您将回到项目窗口。点击与WordPress服务关联的开始按钮以部署容器。

这就是在本地机器上使用DockStation创建一个非常基本的容器部署。

将DockStation连接到远程主机

这部分有点棘手,因为它在幕后隐藏起来。我们将使用SSH作为连接远程机器的方法。在此之前,我们需要生成SSH密钥,并将其复制到我们的远程主机。

要生成SSH密钥,打开终端窗口,执行命令:

ssh-keygen

接下来接受默认设置,出现提示时确保为密钥提供强密码。

生成密钥后,必须使用以下命令将其复制到远程服务器:

ssh-copy-id USER@SERVER

其中USER是远程服务器上的用户名,SERVER是远程服务器的IP地址。

复制密钥后,您现在可以将DockStation连接到远程服务器。为此,点击Containers选项卡,然后点击左上角localhost左侧的编辑按钮(图 6)。

图6:DockStation Containers选项卡不仅显示所有运行中的容器,还让您可以连接到远程主机。

在随后出现的窗口(图 7)中,点击ADD。

图7:为DockStation添加新的远程连接。

点击随后出现的窗口中的SSH选项卡,并填写必要的信息(图 8)。

图8:为我们通过SSH连接到远程主机添加详细信息。

点击确定,出现提示时键入之前生成的SSH密钥的密码。现在,从localhost下拉菜单(左上角)选择刚创建的新连接,然后点击CONNECT。同样,系统提示您输入SSH密钥密码。成功验证后,您将看到远程服务器上运行的所有容器(图 9)。

图9:成功了,我们现在可以管理出现在远程服务器上的容器。

这是另一个用于管理容器部署的Docker GUI。我承认我是DockStation的粉丝,但确实希望DockStation可以做到从GUI里面部署到远程服务器。即使存在这个不足,DockStation仍不失为一款出色的容器管理工具。

参考链接:https://thenewstack.io/how-to-manage-your-docker-containers-with-dockstation/

K8S中文社区微信公众号

评论 6

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #6

    Joe Engressia Thank you for Helping me in changing my grade and credit score in good shape, Now am a graduate finally, reach out to him of you need his service related to hacking service, His a very good one. reach him here
    DIGITALDAWGPOUNDHACKERGROUP@GMAIL.COM
    whatsapp no. : +1 732 639 1527

    Ivan Jefferey4个月前 (10-14)回复
  2. #5

    People find it hard to stay committed again. It’s becoming a difficult thing. Getting information & data you need is quite not a big deal. Sometimes the truth needs to be unveiled by whatsoever means necessary. The latter of the case should always be reckoned with, of which it would be known eventually what would be the data at hand afterwards. definitely contact Thomas would do justice on this intercepting with wares and you will have me to thank later.
    I finally caught him red handed…
    They also have a refund policy if you wish not to go further with your job.
    Contact him via
    Email; tomcyberghost@gmail.com Text/Call +17207941811, WhatsApp +1 3047457645

    Tested and trusted.

    florence jenny3个月前 (10-25)回复
  3. #4

    I was able to catch my cheating husband red handed with a lady he has been having a love affair with and this was made possible by Fred hacker that I met through a comment posted by Kimberly Jane on Reddit about his good and professional services. I started getting suspicious of my husband since he became too possessive of his phone which wasn’t the way he did prior before now. He used to be very carefree when it comes to his phone. but now he’s become obsessed and overtly possessive. I knew something was wrong somewhere which was why i did my search for a professional hacker online and contacted the hacker for help so he could penetrate his phone remotely and grant me access to his phones operating system, he got the job done perfectly without my husband knowing about it although it came quite expensive more than i thought of.i was marveled at the atrocities my husband has been committing. Apparently he is a chronic cheat and never really ended things with his ex.. contact him here. Fredvalcyberghost@gmail.com and you can text, call him on +14236411452 and you can WhatsApp him on +15177981808.

    Monica Regina3个月前 (10-28)回复
  4. #3

    My husband has been frequently deleting all messages for the last couple of days from his phone and he didn’t know i was peeping at him, then i asked him why he was deleting all messages from his phone but he claimed that his phone memory was full and needed more space. Immediately I went in search of a hacker who can get me deleted information and contents from my husband’s phone and luckily for me i came across this reputable ethical hacker Me Fred, this hacker got the job done for me and provided me with results and i saw that my husband has been lying to me. He was simply deleting all pictures, call logs, chats and text messages between him and his secret lover so i wont get to see what he has been doing at my back. Thank God for reputable hackers who are ready to help. I must say am really impressed with the services i got from The hacker Detective and am here to say a very big thank you: contact him on fredvalcyberghost@gmail.com and you can text, call him on +;;1- (;;4;;23)641 1452 and whatsapp him on +15177981808

    Stephanie Duran3个月前 (10-28)回复
  5. #2

    Imagine losing your life savings of almost half a million dollars to a group of African scammers thinking you are going to earn more from cryptocurrency investment, that would have been disaster but Cyber Genie made that not to happen thereby rescuing me from life of torture and regrets that could have led to suicide. Don’t ever give up on trying to recover your lost investment to those African crooks, write them on [Cybergenie AT cyberservices .com] Whatspp [+1-252-512-0391]

    Fernando2个月前 (11-27)回复
  6. #1

    It took 11 months but I was able to get my money back. Earlier this year I got entangled with a military doctor serving in Syria via a hookup site, we chit-chatted for weeks and she introduced me to cryptocurrency that she has earned massively. I was tempted to try it as I was going through some financial challenges after my chaotic divorce. I did invest $393,000.00 AUD dollars which I got from my divorce settlement. That’s when I realized I have been swindled. Months later, I came across a testimonial, I never thought that after all these months I will be able to recover my lost Bitcoin from those scammers but ( Cybergenie@cyberservices.com )WhatsApp (+1) 252-512-0391). made that possible, here I am with a grateful heart to CYBER GENIE INTERCONTINENTAL…

    Russell B3周前 (01-09)回复