• james-portainer@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    You shouldn’t need to build the image - the image already exists on Docker Hub. What you want to do is create a container (or stack) that uses the existing image on Docker Hub. Here’s a slightly modified version of the stack file from the NPM documentation that you can deploy in Portainer (the only change I’ve made is to turn the relative path bind mounts into named volumes):

    version: '3.8'
    services:
      app:
        image: 'jc21/nginx-proxy-manager:latest'
        restart: unless-stopped
        ports:
          - '80:80'
          - '443:443'
          - '81:81'
    
        volumes:
          - data:/data
          - letsencrypt:/etc/letsencrypt
    
    volumes:
      data:
      letsencrypt:
    

    In Portainer, go to Stacks, click Add stack, give the stack a name, then paste this into the Web editor and deploy.

    Building an image is generally reserved for when you are either creating an image from scratch or are extending an existing image with your own modifications. Simply deploying a container from an image that someone else has created doesn’t require any image building.