Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Docker image version #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ It is also possible to pass a parameter file:
### Docker images

SNB Datagen images are available via [Docker Hub](https://hub.docker.com/orgs/ldbc/repositories).
The image tags follow the pattern `${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}`, e.g `ldbc/datagen-standalone:0.5.0-2.12_spark3.2`.
The image tags follow the pattern `${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION}`, e.g `ldbc/datagen-standalone:0.5.1-2.12_spark3.2`.

When building images ensure that you [use BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/#to-enable-buildkit-builds).

Expand All @@ -203,7 +203,7 @@ docker run \
--mount type=bind,source="$(pwd)"/out_sf${SF}_bi,target=/out \
--mount type=bind,source="$(pwd)"/conf,target=/conf,readonly \
-e SPARK_CONF_DIR=/conf \
ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION} \
ldbc/datagen-standalone:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION} \
--parallelism 1 \
-- \
--format csv \
Expand All @@ -218,7 +218,7 @@ The standalone Docker image can be built with the provided Dockerfile. To build,
export PLATFORM_VERSION=$(sbt -batch -error 'print platformVersion')
export DATAGEN_VERSION=$(sbt -batch -error 'print version')
export DOCKER_BUILDKIT=1
docker build . --target=standalone -t ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}
docker build . --target=standalone -t ldbc/datagen-standalone:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION}
```

#### JAR-only image
Expand All @@ -234,19 +234,19 @@ COPY --from=ldbc/datagen-jar:${VERSION} /jar /lib/ldbc-datagen.jar
The JAR-only Docker image can be built with the provided Dockerfile. To build, execute the following command from the repository directory:

```bash
docker build . --target=jar -t ldbc/datagen-jar:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}
docker build . --target=jar -t ldbc/datagen-jar:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION}
```

#### Pushing to Docker Hub

To release a new snapshot version on Docker Hub, run:

```bash
docker tag ldbc/datagen-jar:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION} ldbc/datagen-jar:latest
docker push ldbc/datagen-jar:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}
docker tag ldbc/datagen-jar:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION} ldbc/datagen-jar:latest
docker push ldbc/datagen-jar:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION}
docker push ldbc/datagen-jar:latest
docker tag ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION} ldbc/datagen-standalone:latest
docker push ldbc/datagen-standalone:${DATAGEN_VERSION/+/-}-${PLATFORM_VERSION}
docker tag ldbc/datagen-standalone:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION} ldbc/datagen-standalone:latest
docker push ldbc/datagen-standalone:${DATAGEN_VERSION/[-+]*/}-${PLATFORM_VERSION}
docker push ldbc/datagen-standalone:latest
```

Expand Down