Skip to content

Instantly share code, notes, and snippets.

View krishofmans's full-sized avatar

Kris krishofmans

View GitHub Profile
@krishofmans
krishofmans / Docker-multistage-example.MD
Last active November 25, 2019 21:41 — forked from liemle3893/Docker-multistage-example.MD
Docker Multistage + Spring Boot = Smaller Container Sized

docker-multi-stage

Spring Boot + Docker Multistage = Smaller container size

Use can use prebuild version by using:

$ docker run -d -p 8080:8080 saboteurkid/smaller-spring:1.0

Wait for docker to pull and up. Then jump to step #6

1. Clone example project from Spring Boot repository

import org.apache.activemq.command.ActiveMQTextMessage
import org.springframework.context.event.EventListener
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.jms.core.JmsTemplate
import org.springframework.jms.core.MessageCreator
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
import javax.jms.Queue
import javax.jms.TextMessage
@krishofmans
krishofmans / monitoring setup.md
Last active February 16, 2017 20:31
Setup basic grafana/influxdb/telegraf environment to play with

Create a software defined network that we will use to let the containers communicate with eachother

docker network create statnet --attachable

Create a volume container for grafana's configuration + grafana instance

docker run -d -v /var/lib/grafana --name grafana-storage busybox:latest

docker create \