SearchSourceBuilder getSearchSourceBuilder(QueryWrapper queryWrapper) {
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder()
if (queryWrapper.query) {
sourceBuilder.query(queryWrapper.query)
}
if (queryWrapper.fields) {
sourceBuilder.fields(queryWrapper.fields)
This file contains 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 | |
MAINTAINER NaN Labs | |
# install default aptitude apache2 | |
# try to use the less amount of RUN executions | |
# to reduce the image binary file | |
RUN apt-get update && apt-get install -y apache2 | |
# environment variable deployKey will be available |
This file contains 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
#!/bin/bash | |
# we can add any command to be executed whe the container is run | |
tail -f /dev/null |
This file contains 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
object RomanConverter { | |
val ENTRY_LIST = collection.immutable.List(1 -> "I", 5 -> "V", 10 -> "X", 50 -> "L", 100 -> "C", 500 -> "D", 1000 -> "M").reverse | |
val ENTRY_MAP = collection.immutable.Map[String, Int]("I" -> 1, "V" -> 5, "X" -> 10, "L" -> 50, "C" -> 100, "D" -> 500, "M" -> 1000) | |
/** | |
* Retrieves the number converted to Roman expression | |
*/ | |
def convertToArabic(roman: String): Int = { |
Many times we need to set up or deploy an application (installing dependencies, dealing with mismatched versions, etc.), and then we need to replicate that work into another server… This situation will annoy us unless we create a sort of agnostic recipe to deal with that problem.. Well, this is where Docker’s magic comes to rescue!
We are using a simple example to show some of the interesting features of Docker. Let’s now suppose that we need to install two Apache Web Servers using different source folders.
Installing Docker engine is quite easy, we can follow the steps for our specific platform here