TechRepublic on Flipboard

2022-06-15 17:30:59 By : Ms. Lisa Li

Register for your free TechRepublic membership or if you are already a member, sign in using your preferred method below.

We recently updated our Terms and Conditions for TechRepublic Premium. By clicking continue, you agree to these updated terms.

Invalid email/username and password combination supplied.

An email has been sent to you with instructions on how to reset your password.

By registering, you agree to the Terms of Use and acknowledge the data practices outlined in the Privacy Policy.

You will also receive a complimentary subscription to TechRepublic's News and Special Offers newsletter and the Top Story of the Day newsletter. You may unsubscribe from these newsletters at any time.

Username must be unique. Password must be a minimum of 6 characters and have any 3 of the 4 items: a number (0 through 9), a special character (such as !, $, #, %), an uppercase character (A through Z) or a lowercase (a through z) character (no spaces).

How to create a custom template in Portainer to ease Docker deployments

Your email has been sent

Jack Wallen shows you how to build custom templates in Portainer to help make your container developer process more efficient.

Portainer has become my go-to for managing container deployments. This one-stop-shop makes it incredibly easy to build apps and services and takes care of nearly every step required for full-stack, containerized app deployment.

One feature Portainer includes is the ability to create custom app templates. With these app templates, you can create reusable manifests for full-stack applications. Think of this as your way to create, save and use dockerfiles over and over – all from within the Portainer GUI. Using custom templates is a great way to simplify your workflow and ease your development burden.

SEE: Hiring kit: Back-end Developer (TechRepublic Premium)

To work with custom templates, you’ll need a running instance of Portainer and an account with which to log in. And that’s it: Let’s get to work.

Point your web browser to your Portainer instance and log in with a user account that has the necessary permissions to create various assets on the platform.

Click to expand the App Templates section in the left sidebar and then click Custom Templates (Figure A).

I’m going to demonstrate how to create a custom template for Nextcloud deployments. In the resulting window (Figure B), click Add Custom Template.

In the top section of the Custom Template add page (Figure C), give the template a name – such as nextcloud-template – and a description.

Make sure to select Linux as the platform and if available select Swarm from the type. Once you’ve taken care of that, scroll down to the Build Method section. Paste the following content in the Web Editor section (Figure D). Make sure to edit passwords to be strong and unique:

Scroll to the bottom and click Create Custom Template to save your work.

We can now use our template over and over. In the Custom Template section (Figure E), click the newly-created custom template.

In the resulting window (Figure F), give the stack a unique name and click Deploy The Stack.

After a moment, the stack containers will be up and ready to use.

You can reuse that custom template as often as you like. One thing to keep in mind, however, is that if you re-use it while a previous deployment is running, you will have to change the external port number for Nextcloud, otherwise it will fail to run because the port within the template is already in use.

And that’s all there is to creating and using custom templates in Portainer. Enjoy that newfound efficiency.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

From the hottest programming languages to the jobs with the highest salaries, get the developer news and tips you need to know.

How to create a custom template in Portainer to ease Docker deployments

Your email has been sent

Your message has been sent

TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.

These 11 cloud-to-cloud solutions back up your organization’s data so you’ll be covered in the event of deletions, malware or outages. Compare the best online cloud backup services now.

You can use a mobile device to speak with another person directly through the Teams app. Lance Whitney shows you how to use this handy feature.

A phishing technique called Browser in the Browser (BITB) has emerged, and it’s already aiming at government entities, including Ukraine. Find out how to protect against this new threat.

With so many project management software options to choose from, it can seem daunting to find the right one for your projects or company. We’ve narrowed them down to these nine.

Start-ups, DARPA and Accenture Ventures announce research partnerships, new hardware and strategic investments.

IIoT software assists manufacturers and other industrial operations with configuring, managing and monitoring connected devices. A good IoT solution requires capabilities ranging from designing and delivering connected products to collecting and analyzing system data once in the field. Each IIoT use case has its own diverse set of requirements, but there are key capabilities and ...

Recruiting an Operations Research Analyst with the right combination of technical expertise and experience will require a comprehensive screening process. This Hiring Kit provides an adjustable framework your business can use to find, recruit and ultimately hire the right person for the job.This hiring kit from TechRepublic Premium includes a job description, sample interview questions ...

The digital transformation required by implementing the industrial Internet of Things (IIoT) is a radical change from business as usual. This quick glossary of 30 terms and concepts relating to IIoT will help you get a handle on what IIoT is and what it can do for your business.. From the glossary’s introduction: While the ...

Procuring software packages for an organization is a complicated process that involves more than just technological knowledge. There are financial and support aspects to consider, proof of concepts to evaluate and vendor negotiations to handle. Navigating through the details of an RFP alone can be challenging, so use TechRepublic Premium’s Software Procurement Policy to establish ...