Giter Club home page Giter Club logo

micro-portainer's Introduction

Nginx Proxy for Docker API

Using Docker API being proxied by Nginx, to expose its information on some UI made with VueJS.

Based on Portainer: https://docs.portainer.io/v/ce-2.9/start/install/server/docker/linux

Running Portainer:

docker volume create portainer_data

docker container run -d \
  -p 8000:8000 \
  -p 9443:9443 \
  --name portainer \
  --restart=always \
  -v portainer_data:/data \
  -v /var/run/docker.sock:/var/run/docker.sock \
  portainer/portainer-ce:2.9.3
# access on https://localhost:9443

docker container logs -f --tail 50 portainer

# clean up
docker container rm -f portainer
docker volume rm portainer_data

Up and Running (image from Docker Hub)

https://hub.docker.com/repository/docker/juliocesarmidia/micro-portainer

# default docker API version used: 1.41
docker container run -d \
  -p 8080:8080 \
  --name micro-portainer \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  juliocesarmidia/micro-portainer:latest
# access on http://localhost:8080

# logs
docker container logs -f --tail 50 micro-portainer

# clean up
docker container rm -f micro-portainer

Up and Running (local build)

# retrieve current docker API version
export V_DOCKER_API="$(docker version | awk '/^\sAPI\sversion/{print $3}')"

docker-compose up -d --build micro-portainer
# access on http://localhost:8080

# logs
docker-compose logs -f --tail 50 micro-portainer

UI access

http://localhost:8080

image

Registries

Docker Hub

https://hub.docker.com/repository/docker/juliocesarmidia/micro-portainer

export DOCKERHUB_USERNAME='juliocesarmidia'
export DOCKERHUB_TOKEN=''
# login
echo "$DOCKERHUB_TOKEN" | docker login docker.io -u "$DOCKERHUB_USERNAME" --password-stdin
# push image
docker image push "docker.io/$DOCKERHUB_USERNAME/micro-portainer:latest"

Github

https://github.com/juliocesarscheidt/micro-portainer/pkgs/container/micro-portainer

In order to use the GITHUB_TOKEN in CI with Github Actions to push the image to ghcr.io registry, we need to enable the following config in the package configuration:

image

Also, we need to add the repository to manage Actions access, and set the permission to write:

image

export GITHUB_USERNAME='juliocesarscheidt'
export GITHUB_TOKEN=''
# login
echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USERNAME" --password-stdin
# tag and push image
docker image tag "docker.io/juliocesarmidia/micro-portainer:latest" "ghcr.io/$GITHUB_USERNAME/micro-portainer:latest"
docker image push "ghcr.io/$GITHUB_USERNAME/micro-portainer:latest"

micro-portainer's People

Contributors

juliocesarscheidt avatar

Watchers

 avatar  avatar

micro-portainer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.