Skip to content

Commit

Permalink
Add Dockerfile and update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
josep committed Jul 30, 2020
1 parent 44e3da8 commit 4f002ed
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2,157 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:20.04

LABEL version="1.0"
LABEL description="Docker image for ncdump-json."

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install wget unzip build-essential cmake pkg-config libnetcdf-dev -y && \
wget https://github.com/jllodra/ncdump-json/archive/master.zip && \
unzip master.zip && \
cd ncdump-json-master && \
cmake . && \
make

WORKDIR /ncdump-json-master

ENTRYPOINT ["./ncdump-json"]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@ It behaves exactly like the original ncdump if you omit the command-line option
---
**NEW!**: Run it with Docker
* No need to compile anything
* Run from any Linux machine, OSX, Win10
Steps:
* Install Docker on your computer (https://docs.docker.com/get-docker/)
* Download this repository (download as zip or clone)
* CD to repository directory
* Build the image: `docker build -t ncdump-json .`
* Test the container: `docker run -it --rm ncdump-json -j tests/socib-buoy.nc`
* Run the container using your own netcdf file: `docker run -it --rm -v "${PWD}/myfile.nc:/data/myfile.nc" ncdump-json -j /data/myfile.nc`
Note: To build the image, you must be in the same directory as the Dockerfile.
To run the container, the -v argument (-v "host path:container path") allows the container to access the .nc file that is on your filesystem.
On Win10, it is slightly different because win paths are different from unix paths, google a bit and find more info.
---
Installation:
* Download latest **release** from https://github.com/jllodra/ncdump-json/releases, **unzip**.
Expand Down
2 changes: 0 additions & 2 deletions legacy/compile_ncdump.sh

This file was deleted.

Loading

0 comments on commit 4f002ed

Please sign in to comment.