mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
Changed up portainer installer
This commit is contained in:
1 parent
9ea37b603b
commit
89f0726f27
2 files changed
+18
-6
No files matched your search
@@ -4,7 +4,5 @@ sudo apt-get install -y python3 python3-pip -y
|
||||
|
||||
sudo pip3 install docker-compose
|
||||
|
||||
|
||||
|
||||
sudo curl -L --fail https://github.com/docker/compose/releases/download/1.29.2/run.sh -o /usr/local/bin/docker-compose
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
@@ -1,7 +1,21 @@
|
||||
#bash
|
||||
#!/bin/bash
|
||||
|
||||
#create the portainer volume:
|
||||
# Script: setup_portainer.sh
|
||||
# Description: Script to set up Portainer using Docker on Linux
|
||||
|
||||
# Variables
|
||||
PORTAINER_PORT=8099
|
||||
DOCKER_SOCK=/var/run/docker.sock
|
||||
|
||||
# Create the portainer volume
|
||||
docker volume create portainer_data
|
||||
|
||||
#Download and create portainer container, have to change default 8000 port on exposed side if you are running yacht on its default port.
|
||||
docker run -d -p 8099: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
|
||||
# Download and create portainer container
|
||||
docker run -d -p $PORTAINER_PORT:8000 -p 9443:9443 --name portainer --restart=always -v $DOCKER_SOCK:$DOCKER_SOCK -v portainer_data:/data portainer/portainer-ce:latest
|
||||
|
||||
# Check if the container started successfully
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Portainer container is up and running."
|
||||
else
|
||||
echo "Failed to start Portainer container."
|
||||
fi
|
||||
Reference in new issue
Block a user