Skip to content

Instantly share code, notes, and snippets.

Best Practices to build Java Container

  1. Use explicit and deterministic Docker base image tags
  2. Install only what you need in production in the Java container image
  3. Find and fix security vulnerabilities in your Java Docker image
  4. Use multi-stage builds
  5. Don’t run Java apps as root
  6. Properly handle events to safely terminate a Java application
  7. Gracefully tear down Java applications
  8. Use .dockerignore

Best Practices to build Java Container

  1. Use explicit and deterministic Docker base image tags
  2. Install only what you need in production in the Java container image
  3. Find and fix security vulnerabilities in your Java Docker image
  4. Use multi-stage builds
  5. Don’t run Java apps as root
  6. Properly handle events to safely terminate a Java application
  7. Gracefully tear down Java applications
  8. Use .dockerignore
=== Visual Studio Community 2017 for Mac ===
Version 7.6.1 (build 9)
Installation UUID: ead92a59-8793-4338-88dc-31c9593a748a
Runtime:
Mono 5.12.0.301 (2018-02/4fe3280bba1) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 512000301
@d-krey
d-krey / gist:1c9e4dc8be6713ad66dbd63fab3b3d90
Created August 26, 2018 22:57
error MSB4018: The "GenerateJavaStubs" task failed unexpectedly.
ks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: The "GenerateJavaStubs" task failed unexpectedly.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: System.IO.FileNotFoundException: Could not load assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: File name: 'System.Runtime.dll'
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2152,3): error MSB4018: at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters) [0x0009a] in /Users/builder/data/lanes/6090/a8a3b0ec/source/monodroid/external/xamarin-android/external/Java.Interop/src/J