Sign inSign up

dlsimg/node-24.14.1-ghostscript-no-im

By dlsimg

Updated 5 months ago

https://3.basecamp.com/4489886/buckets/20201395/messages/9788178865#__recording_9792902864

Image
0

10K+

dlsimg/node-24.14.1-ghostscript-no-im repository overview

setup-core

Running with compose

Pre-requisites

  1. Ensure Docker is installed
  2. Clone the repository and use the commands below
  3. Change folder so that docker-compose.yml is current path cd setup-core

Interactive mode, with logs docker-compose up

Detached mode docker-compose up -d

Logs of all containers (and follow) docker-compose logs -f

Logs of a specific container (and follow) docker-compose logs -f usergrid

Lists containers & their status docker-compose ps

Tear down an environment (Stop and remove containers, networks, images, and volumes)

Leave images & volumes docker-compose down

Leave nothing docker-compose down -rmi -v

Shipping container logs to central server

There are many ways to achieve this. We use a dedicated logging container. Dedicated logging containers let you manage logging from within the Docker environment. They can retrieve log events from other containers, aggregate them, then store or forward the events to a third-party service.

https://github.com/gliderlabs/logspout

The Logspout container automatically captures stdout output from any containers running on the same host and forwards them to a remote syslog service. You can define the destination URL when running the container:

docker run --name="logspout" \
	--volume=/var/run/docker.sock:/var/run/docker.sock \
	gliderlabs/logspout \
	syslog+tls://logs.papertrailapp.com:55555

Centralized monitoring

As first step use docker stats. The docker stats command is useful for getting information on the command line, however, if you would like to access the information in a graphical interface you will need a tool such as CAdvisor.

https://github.com/google/cadvisor

CAdvisor provides a visual representation of the data shown by the docker stats command earlier. Run the docker command below and go to http://<your-hostname>:8080/ in the browser of your choice to see the CAdvisor interface. You will be shown graphs for overall CPU usage, Memory usage, Network throughput and disk space utilization. You can then drill down into the usage statistics for a specific container by clicking the Docker Containers link at the top of the page and then selecting the container of your choice.

docker run                                      \
  --volume=/:/rootfs:ro                         \
  --volume=/var/run:/var/run:rw                 \
  --volume=/sys:/sys:ro                         \
  --volume=/var/lib/docker/:/var/lib/docker:ro  \
  --publish=8888:8080                           \
  --detach=true                                 \
  --name=cadvisor                               \
  google/cadvisor:latest

cAdvisor supports exporting stats to various storage driver plugins for time-series analytics (elasticsearch, prometheus. To enable a storage driver, set the -storage_driver flag. See https://github.com/google/cadvisor/blob/master/docs/storage/README.md

Run manually with Docker

Instead of using docker-compose, you can use Docker directly. The examples below use the automated builds from the Docker Hub.

Start Cassandra and Elasticsearch:

docker run --detach --name cassandra --volume $(pwd)/cassandra-data:/var/lib/cassandra dlsimg/cassandra
docker run --detach --name elasticsearch --volume $(pwd)/elasticsearch-data:/data dlsimg/elasticsearch

Start Usergrid, configuration is done using environment variables (--env).

docker run --detach --name usergrid --env ADMIN_PASS=password --env ORG_NAME=org --env APP_NAME=app --link elasticsearch:elasticsearch --link cassandra:cassandra -p 8080:8080 dlsimg/usergrid

Start the Usergrid admin portal

docker run --detach --name portal --env USERGRID_HOST=usergrid:8080 -p 80:80 dlsimg/usergrid-portal

Useful docker commands

docker build — The docker build command builds Docker images from a Dockerfile. Use the -t flag to label the image, for example docker build -t my_container . with the . at the end signalling to build using the currently directory.

cd cassandra && build -t cassandra .
cd elasticsearch && build -t elasticsearch .
cd usergrid\baas && build -t usergrid .
cd usergrid\portal && build -t portal .

Docker pull - pulls an image from remote repositository (docker hub by default), for example docker pull dlsimg/base-node:latest.

docker attach will let you connect to your Docker container, but this isn't really the same thing as ssh. If your container is running a webserver, for example, docker attach will probably connect you to the stdout of the web server process. It won't necessarily give you a shell.

docker exec will let you run arbitrary commands inside an existing container. For example: docker exec -it <mycontainer> bash starts an interactive shell. Whatever command (bash in this case) you are running must exist in the container filesystem.

get container IP from host docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id. Or use exec docker exec -it container_name ip addr

kill all running containers with docker kill $(docker ps -q)

delete all stopped containers with docker rm $(docker ps -a -q)

delete all images with docker rmi $(docker images -q)

Useful usergrid command line ugc commands

Install ugc with gem install ugc. Documentation is here. For more examples, see the ugc examples.

  • ugc profile org - create profile with name org. subsequent commands are applied to this profile.
  • ugc target url http://$IP:8080/org/app - use host at $IP, organization called org and app called app
  • ugc login --admin [email protected] - log in as one of the admins users admin or orgadmin. password is the same as the username.
  • ugc login [email protected] - log in as regular user. there is a default user called orguser. password is same as username.
  • ugc list collections - list collections. think of it as tables in a relational database. you can list other things as well.

Tag summary

Content type

Image

Digest

sha256:75f95fad6

Size

90.8 MB

Last updated

5 months ago

docker pull dlsimg/node-24.14.1-ghostscript-no-im