Sign inSign up

zerolabssyseng/swarmpit

By zerolabssyseng

•Updated almost 7 years ago

Swarmpit UI Container

Image
0

427

zerolabssyseng/swarmpit repository overview

⁠Swarmpit Container

⁠Configure Makefile.am
IMAGE = zerolabssyseng/swarmpit

clean-local:
	docker rmi $(CLEAN_OPTIONS) $(IMAGE):$(TAG) || true

build:
	docker build $(BUILD_OPTIONS) --build-arg TAG=${TAG} -t $(IMAGE):$(TAG) .

pull:
	docker pull $(PULL_OPTIONS) $(IMAGE):$(TAG)

push: build
	docker push $(PUSH_OPTIONS) $(IMAGE):$(TAG)
⁠Running with make
make [options]:
    clean-local
    build
    pull
    push
⁠Dockerfile
ARG TAG

FROM swarmpit/swarmpit:${TAG:-latest}
MAINTAINER "System Engineer (SysEng)"

RUN apk add --update curl && \
    rm -rf /var/cache/apk/*

ENV VERSION="19.03.2"
ENV SWARMPIT_DB="http://db:5984" \
    SWARMPIT_INFLUXDB="http://influxdb:8086"

ENV INTERACTIVE=0 \
    ADMIN_USERNAME=admin \
    ADMIN_PASSWORD=password

RUN curl -L -o /tmp/docker-$VERSION.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VERSION.tgz \
    && tar -xz -C /tmp -f /tmp/docker-$VERSION.tgz \
    && mv /tmp/docker/docker /usr/bin \
    && rm -rf /tmp/docker-$VERSION /tmp/docker

EXPOSE 8080
CMD [ "java", "-jar", "swarmpit.jar" ]
⁠Docker Compose (Skeleton)
version: '3.5'

services:
  app:
    image: swarmpit/swarmpit:latest
    environment:
      - VERSION=${DOCKER_VERSION:-19.03.2}
      - SWARMPIT_DB=http://db:5984
      - SWARMPIT_INFLUXDB=http://influxdb:8086
      - INTERACTIVE=0
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=password
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 3101:8080
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.50'
          memory: 1024M
        reservations:
          cpus: '0.25'
          memory: 512M
      placement:
        constraints:
          - node.role == manager

  db:
    image: couchdb:2.3.0
    volumes:
      - db-data:/opt/couchdb/data
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.30'
          memory: 256M
        reservations:
          cpus: '0.15'
          memory: 128M

  influxdb:
    image: influxdb:1.7
    volumes:
      - influx-data:/var/lib/influxdb
    networks:
      - net
    deploy:
      resources:
        limits:
          cpus: '0.30'
          memory: 256M
        reservations:
          cpus: '0.15'
          memory: 128M

  agent:
    image: swarmpit/agent:latest
    environment:
      - DOCKER_API_VERSION=1.35
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - net
    deploy:
      mode: global
      labels:
        swarmpit.agent: 'true'
      resources:
        limits:
          cpus: '0.10'
          memory: 64M
        reservations:
          cpus: '0.05'
          memory: 32M

networks:
  net:
    driver: overlay
    attachable: true

volumes:
  db-data:
    driver: local
  influx-data:
    driver: local

Tag summary

Content type

Image

Digest

Size

261 MB

Last updated

almost 7 years ago

docker pull zerolabssyseng/swarmpit