mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
sds
dsd
This commit is contained in:
1 parent
f70699a2aa
commit
0b911a2d07
27 files changed
+8
-162
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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
|
||||
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