Portainer

25 readers
0 users here now

Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments.

founded 1 year ago
MODERATORS
1
 
 

I'm using Community Edition trying to use 'Stacks' which resides on a proxmox node.

I'm a bit confused how to read in config files to portainer from either a git repo or locally.

For example, I have this example in my docker-compose.yml file where I read in a config file in the same directory called 'prometheus.yml':

version: '3'

services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--web.enable-lifecycle'
    ports:
      - 9090:9090
    restart: unless-stopped
    volumes:
      - /home/phil/gitrepos/prometheusTesting/:/etc/prometheus/
      - prom_data:/prometheus
volumes:
  prom_data:

The stack launched but then in the container log I saw this error:

ts=2023-11-26T18:36:49.719Z caller=main.go:487 level=error msg="Error loading config (--config.file=/etc/prometheus/prometheus.yml)" file=/etc/prometheus/prometheus.yml err="read /etc/prometheus/prometheus.yml: is a directory"

I also tried via git repository but portainer complaine about the relative path which has thrown me because I thought portainer would just clone the repo and run as is..

version: '3'

services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--web.enable-lifecycle'
    ports:
      - 9091:9091
    restart: unless-stopped
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prom_data:/prometheus

So.. How do I handle passing in these config files? Any examples would be super useful.

2
 
 

Hi everyone,

i need to have interaction with one of my containers.
Is it possible to do this inside the portainer?

Best Regards, Shahram

https://preview.redd.it/7q122fcklj2c1.png?width=3245&format=png&auto=webp&s=a3e9c507cdf8c69764399fe72f0732b932f1e76a

3
 
 

I have 3 portainer servers on different VPS's on different providers.
I'd like to centrally manage them using one, but I guess be able to login to each one if there is an issue.
Do I need to install both the server and agent on both the 'remote' machines, or can I just have the server and use that.

4
 
 

I have attempted to google and have found a few things but none of it really makes sense to me (beginner in the Ubuntu server / Portainer / Docker space)

I have installed Ubunut server 22.04 and used the inbuilt docker as part of the intial install.

From there I installed Portainer

docker volume create portainer_data

sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

I then added NFS shares from another server via fstab

Then when in Portainer - from what I gathered I should have been able to set bind to /media/nfsshare1

But that does not work.

And then when attempting to add an NFS volume the containers can't see anything or use them if I point them to the volume.

Any help - or step by step idiot guide for this would be super appreciated

5
 
 

Hi,
I'm failing big time to deploy the official netbox docker-compose on Portainer. I love Portainer and I would like to have netbox as a stack on Portainer. But I can't make it work even spending more than just a couple of evenings.
I have forked the repo and used it to deploy from the git repo, using additional paths for docker-compose. override.yml

I have tried it as a simple docker-compose up and it worked, but not how I wont it.

sad face.

6
 
 

Hi,
With Portainer on Debian. I'm trying to create a stack from the git repo and the "additional path" function is required for me to add a file for the compose file. The problem is, that it is impossible to describe the patch. I have a file on the file system under `/mnt/lvol-docker/AppData/netbox/docker-compose.override.yml`, but when deploying the stack I have an error message saying that the directory or file does not exist. Weirdly enough my described path is appended with `/data/compose/78/b47e85ab3f2261021adf99ae9de2e9692fd674c3/mnt/lvol-docker/AppData/netbox/docker-compose.override.yml` but such a directory not exist. If I create such a directory structure and drop my file, then it looks like another random directory with a different number/name.

https://preview.redd.it/6qywnapaxd1c1.png?width=1594&format=png&auto=webp&s=db4eb1197769db29ebab7f8a98b2abc27cddf47d

What I'm missing here? Or maybe something else is involved? Any hints?

Thank you.

7
 
 

Hello, im trying to run Ubuntu as full fledged Ubuntu, like installing ubuntu on portainer docker and use it like its own machine, but when i install ubuntu the container never starts any idea why? Not ubuntu but any os in general but if i run the command with docker it works fine

8
 
 

Probably a bit of a newb question (and I think I know the answer) but still.....

I want to add labels to my portainer container (to move it behind traefik and authelia) but I obviously can't rebuild from itself.

I also, for some reason, can't find the docker-compose otherwise i'd add them there.

Am I missing something or do I need to rebuild and hope?

9
 
 

I currently have one smb share marked as a volume in portainer but given that the password is in plain text inside of portainer this seems like a bad idea.

So what is the best way to add them into portainer and to make use of them? So far the SMB share I did add works for some containers and others get permission errors with the same puid and pgid as the ones that are working. I set umask to 002 also.

10
 
 

I have setup an ubuntu 22.04 server on my proxmox host.

Installed docker and portainer on it.

Get to the portainer webgui.

Install / deploy a docker in this example - nginx proxy manager

Docker container installs and webgui is accessible.

Run through setup etc, add a proxy host confirm reverse proxy works.

If I reboot the host it loses all settings, how do I make it actually retain settings? Or what am I doing wrong? Is there some sort of setting I am just not seeing or or something?

This is my first time attempting to use portainer for anything.

11
 
 

I am a novice with both docker and portainer. I have a container running pihole that I created with Portainer. Pihole console has the version at the bottom and it has a flashing docker tag indicating "update available".

How do I update the docker tag? Do I "recreate" the container?