Commit c6bb700e authored by Caillat Michel's avatar Caillat Michel
Browse files

Update README.md

parent 9ae6a3c7
......@@ -19,7 +19,7 @@ The relations between the user's WEB browser and the servers `yafitss` and `yafi
## Building the image
* Set the directory where all the project sources, including `Dockerfile`, resides as the current directory :
* Set the directory's project as the current directory :
`cd <..>/yafits`
......@@ -32,13 +32,43 @@ Note that the choice of the tag assigned to the image is left to the choice of t
## Running the image in container
The command given below has some parts which must used verbatim while others can be changed following the host specificities and the installer's preferences.
`
docker run --name yafits_1 -p4250:4250 -v"/obs/partemix/dckr/yafitss/log:/home/partemix/log" -v"/datartemix/ALMA:/home/partemix/dataroot" -i -t yafits_1
docker run --name yafits_1 -p4250:4250 -v"/obs/partemix/dckr/yafitss/log:/home/partemix/log" -v"/datartemix/ALMA:/home/partemix/dataroot" yafits_1
`
where :
* `yafits_1` after the `--name` option is the name given to the container. It can be freely adapted by the installer.
* `4250:4250`after the `-p` option defines the mapping between the internal and exposed container's port (after the `:`) and the host's port ( before the `:`). The first value, that is the host's port can be changed by the installer.
* `/obs/partemix/dckr/yafitss/log:/home/partemix/log` after the `-v` option : a bind mount of the host directory `/obs/partemix/dckr/yafitss/log` is performed on the container directory `/home/partemix/log` . Again the host directory can be adjusted by the installer. ( See **Files considerations** )
* `/datartemix/ALMA:/home/partemix/dataroot` after the `-v` option : a bind mount of the host directory `/datartemix/ALMA` the container's directory `/home/partemix/dataroot`. Again the host directory can be adjusted by the installer. ( See **Files considerations** )
\ No newline at end of file
* `/obs/partemix/dckr/yafitss/log:/home/partemix/log` after the `-v` option : a bind mount of the host directory `/obs/partemix/dckr/yafitss/log` is performed on the container directory `/home/partemix/log`. This mount defines where the log files will be written on the host filesystem. Again the host directory can be adjusted by the installer. ( See **Files considerations** )
* `/datartemix/ALMA:/home/partemix/dataroot` after the `-v` option : a bind mount of the host directory `/datartemix/ALMA` the container's directory `/home/partemix/dataroot`. This mount defines where FITS files will be read and where the PNG files will be written on the filesystem. Again the host directory can be adjusted by the installer. ( See **Data Files organization** and **Files considerations** )
## Account considerations.
Instead of leaving the default account (root, uid==0) running the code, one uses a specific account created during the image build. Its name is `partemix` with uid==1000, gid==1001.
## Data files organization.
Data files are on the one hand the FITS files (readonly) and on the other hand the PNG files (read/write). The software expects to find these files respectively in a `FITS`
directory and in a `PNG` directory both subdirectories of a same toplevel directories.
|host|container|
|:----:|:----:|
| /datartemix/ALMA |/home/partemix/dataroot |
| /datartemix/ALMA/FITS , /datartemix/ALMA/PNG | /home/partemix/FITS , /home/partemix/PNG |
## Files considerations.
A characteristic of the container is that **all** the data that it accesses to are residing on the host filesystem. The container has NO data on his own; in other words all the data are persistent. A particular attention must therefore be paid to the protections defined on the data and the permissions to be set up for the applications executed by the container have the necessary access to them.
The informations given below are pertinent with the assumption that the image has been built with the Dockerfile left unchanged.
### FITS files.
The FITS files which are the _raw material_ of yafits are accessed to as a readonly resource of the host filesystem. The most permissive way to ensure their readability
by the container is to make them readable by anyone (`chmod a+r`). A less permissive approach is to allow them to be read by the group gid==1001 and to put their owner into that group, possibly at the cost of creating such a group. The most restrictive access would be to have a user with uid==1000 ( which is not always possible ) and the FITS files belonging to that user.
### PNG files.
The PNG files are temporary files generated on the fly for the visualization of FITS files contents. Consequently the directory used as a repository for these files must be writable by (uid==1000,gid==1001). As for the FITS files one can
choose between the three options 1) writable by anyone 2) writable by group==1001 with the PNG directory's owner in that group and 3) the PNG directory belonging to uid==1000 and writable by the owner.
### LOG files.
Both servers `yafitsv` and `yafitss` generates log files in a directory of the host which must be writable by uid=1000,gid=1001. Again one can use one of the strategies presented above for the PNG and FITS files.
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment