sed -e 's/oldstuff/newstuff/g' inputFileName > outputFileName
...
ARG params
ENV params_env=$params
ENTRYPOINT ["java", "-Dparams=${params_env}", "-jar", "app.jar" ]
docker build -f Dockerfile -t basic-args-example --build-arg "params=eyJpZCI6MH0K".
ARG
а из него в ENV
и уж из него в ENTRYOINT
{"id":0}
class element_to_be_clickable(object):
""" An Expectation for checking an element is visible and enabled such that
you can click it."""
def __init__(self, locator):
self.locator = locator
def __call__(self, driver):
element = visibility_of_element_located(self.locator)(driver)
if element and element.is_enabled():
return element
else:
return False
class visibility_of_element_located(object):
""" An expectation for checking that an element is present on the DOM of a
page and visible. Visibility means that the element is not only displayed
but also has a height and width that is greater than 0.
locator - used to find the element
returns the WebElement once it is located and visible
"""
def __init__(self, locator):
self.locator = locator
def __call__(self, driver):
try:
return _element_if_visible(_find_element(driver, self.locator))
except StaleElementReferenceException:
return False
# based on examples from https://docs.microsoft.com/en-us/dotnet/api/system.consolekey?view=netframework-4.5
function WriteAt {
param(
[string] $s,
[int] $x,
[int] $y
)
[System.Console]::SetCursorPosition($origCol + $x, $origRow + $y )
[System.Console]::Write($s)
}
[System.Console]::Clear( )
$origRow = [System.Console]::CursorTop;
$origCol = [System.Console]::CursorLeft;
# Draw the left side of a 5x5 rectangle, from top to bottom.
WriteAt '+' 0 0
WriteAt '|' 0 1
WriteAt '|' 0 2
WriteAt '|' 0 3
WriteAt '+' 0 4
# Draw the bottom side, from left to right.
WriteAt '---' 1 4
# Draw the right side, from bottom to top.
WriteAt '|' 4 3
WriteAt '|' 4 2
WriteAt '|' 4 1
WriteAt '+' 4 0
# Draw the top side, from right to left.
WriteAt '---', 1 0
WriteAt 'Press Enter to quit!' 0 6
[System.Console]::WriteLine( )
while ([System.Console]::ReadKey().Key -ne [System.ConsoleKey]::Enter) {
sleep 1;
}
Application.java
@Value("${appname}")
private String appname;
@GetMapping
public String Hello() {
return "This is " + appname;
Dockerfile
ENTRYPOINT ["java", "-Dappname=my docker appication", "-jar", "app.jar" ]
mvn -Dmaven.test.skip=true clean package
docker build -f Dockerfile -t basic-args-example .
docker run -p 8080:8080 basic-args-example
curl http://localhost:8080/basic
This is my docker application
SHELL ENTRYPOINT
- сам пока осваиваюENTRYPOINT ["java", "-jar", "app.jar", "--spring.config.location=file:///var/properties/application.properties" ]
cp src/main/resources/application.properties ~/Desktop/
sed -i 's|8085|8080|' ~/Desktop/application.properties
mvn clean package
docker build -f Dockerfile -t basic-example .
docker run -v ${HOME}/Desktop/:/var/properties -p 8086:8080 basic-example