Portainer is one of the many GUI tools for managing Docker containers. With this platform, you can develop and deploy full-stack, containerized applications, manage registries, create networks and volumes, work with templates, and much more.
But one feature found in Portainer helps it stand out among a crowded field. That feature is Teams. Not only can you add users to Portainer (for better collaboration), you can assign users to Teams and then assign Teams to Stacks. By doing this, you make it possible to silo developers/teams to specific Stack development. This is a great feature for companies that deploy various types of application stacks as containers and need to be able to control access to those stacks.
But how do you do it? It’s actually pretty easy. Let’s dive in and find out.
What you’ll need
To make this work, you’ll need a running instance of Portainer and a Portainer user with admin privileges.
That’s it. Let’s get to work.
How to add a user to Portainer
The first thing we’ll do is add a user (who can then be added to a new team). Log into Portainer as an admin user and then click Users in the left sidebar (Figure A).
In the resulting window (Figure B), type a username and password to create the new user.
If you already had teams created, you could easily add that user to one. You can also give this new user admin privileges (only do that if the user will need to manage your Portainer platform).
Click Create user to save the new user to the system.
How to add a team to Portainer
Next, we’ll create a new team. For this, click Teams under Users in the left sidebar. In the new window (Figure C), type a name for the new teams and select a leader.
How to add users to a team in Portainer
The next step is to add users to the new team. After you create the new team, it’ll be listed under Teams. Click the name of the new team, and you’ll be transported to a new page where you can manage the team (Figure D).
Click the Add button for any/all users you want to add to the team. If you haven’t already assigned a leader to the team, once you’ve added users, you can assign a leader (or multiple leaders) by clicking the Leader button associated with a user (Figure E).
How to assign Teams to Stacks in Portainer
With your new team(s) created, you can now assign a team to a stack for development. This is done during the stack creation process. Click Stacks, from the left sidebar, and then click Add stack (Figure F).
On the Stack creation page, scroll to the bottom and you’ll see the Access control section (Figure G).
Click Restricted and then select the team you want to assign to the stack from the Teams drop-down (Figure H).
You can then finish up the stack (adding content for the docker-compose file) and then, once you’re finished, click Deploy the stack.
And that’s all there is to using the Teams feature in Portainer. If you have any plans on making Portainer a collaborative tool, this is the way to go.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
Subscribe to the Cloud Insider Newsletter
This is your go-to resource for the latest news and tips on the following topics and more, XaaS, AWS, Microsoft Azure, DevOps, virtualization, the hybrid cloud, and cloud security. Delivered Mondays and Wednesdays