We have a bunch of Spring Boot apps running in various Docker containers and wanted a centralised place to view the logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:18.04 as base | |
| RUN apt-get update -y && apt-get install -y ca-certificates | |
| ADD build/out/data.tar.gz /image | |
| RUN mkdir -p /image/etc/ssl/certs /image/run /image/var/run /image/tmp /image/lib/modules /image/lib/firmware && \ | |
| cp /etc/ssl/certs/ca-certificates.crt /image/etc/ssl/certs/ca-certificates.crt | |
| RUN cd image/bin && \ | |
| rm -f k3s && \ | |
| ln -s k3s-server k3s | |
| FROM ubuntu:18.04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Adds support for application/octet-stream through a RestController using streams. | |
| */ | |
| @Configuration | |
| class WebConfig extends WebMvcConfigurationSupport { | |
| @Override | |
| protected void configureMessageConverters(List<HttpMessageConverter<?>> converters) { | |
| converters.add(new AbstractHttpMessageConverter<InputStream>(MediaType.APPLICATION_OCTET_STREAM) { | |
| protected boolean supports(Class<?> clazz) { | |
| return InputStream.isAssignableFrom(clazz) |
