Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shaomeng authored Jan 31, 2023
1 parent 2091324 commit 7b9a44c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## Use An Existing Image

- One can pull a docker image with SPERR inside from [Docker Hub](https://hub.docker.com/r/shaomeng/sperr-docker): `docker pull shaomeng/sperr-docker:latest`.
- Run this image in a container: `docker run -it shaomeng/sperr-docker:latest`
- One can pull a docker image with SPERR inside from [Docker Hub](https://hub.docker.com/r/shaomeng/sperr-docker): `docker pull shaomeng/sperr-docker:<tag-name>`.
- Run this image in a container: `docker run -it shaomeng/sperr-docker:<tag-name>`
- Inside of this container is a complete development environment. SPERR source code is located at `/home/Odie/SPERR-src` and SPERR is compiled at `/home/Odie/SPERR-src/build`.
- In the build directory, one can run the unit tests (`ctest .`) to verify that the executable works.
- One can also mount a directory from the host system to the container so SPERR can operate on real data:
`docker run -it --mount type=bind,source=/absolute/path/to/host/directory,target=/data,readonly shaomeng/sperr-docker:latest`
`docker run -it --mount type=bind,source=/absolute/path/to/host/directory,target=/data,readonly shaomeng/sperr-docker:<tag-name>`

## Build Your Own Image

A `Dockerfile` is located [here](https://github.com/NCAR/SPERR/tree/main/docker) so you can build your own SPERR images.
- Build an image: enter the same folder with `Dockerfile`, and then type `docker build -t sperr-docker:tag1 .`.
- Give an existing image a new tag: `docker tag <image-sha256> sperr-docker:latest`.
- Give an existing image a new tag: `docker tag <image-sha256> sperr-docker:<new-tag>`.


0 comments on commit 7b9a44c

Please sign in to comment.