blob: 1c8e8be8512584e3b38096363ef59554aa58e79b [file]
[.group-java]
****
The version number of the image is derived from the git commit. If you see error "Given Docker name 'shopping-cart-service:${git.commit.time}-${git.commit.id.abbrev}' is invalid" it is because the directory is not a git repository. You can enable git for the directory with the following commands.
[source,shell script]
----
git init
git add .
git commit -m "some descriptive commit message"
----
Alternatively the version can be specified with `-Dversion.number=0.1-SNAPSHOT`.
----
mvn -Dversion.number=0.1-SNAPSHOT -DskipTests -Ddocker.registry=803424716218.dkr.ecr.eu-central-1.amazonaws.com clean package docker:push
----
****
[.group-scala]
****
The version number of the image, as well as from the project itself, is derived from the git commit using https://github.com/dwijnand/sbt-dynver[sbt-dynver {tab-icon}, window="tab"]. If your project is not being versioned with git, you will see a fixed version number (eg: `HEAD-20210119-1515`). You can enable git for the directory with the following commands.
[source,shell script]
----
git init
git add .
git commit -m "some descriptive commit message"
----
Alternatively you can add the version to your `build.sbt` file and maintain it manually.
[source,shell script]
----
version := "1.0.0"
----
****