0.1.0 • Published 9 years ago
lkpm-packer v0.1.0
lkpm-packer
This is a module that handles packing up jars and modules from within a LabKey Docker image to allow lkpm-style modules to be built without the LabKey source code.
Structure
The labkey.pack file is just a specially formatted .zip file. It contains an index.json at the root of the archive that includes metadata about the archive, with the following fields:
- type
- This is just a "magic string" to verify that the archive is a
labkey.packfile, and not some other type of zip file.
- This is just a "magic string" to verify that the archive is a
- version
- A version number (starting at 1) to indicate the version that this pack file is. This allows future versions to more easily change the format of the archive.
Running manually
To generate a labkey.pack file, run the following mammoth command:
docker run --name labkey_pack -it wnprcehr/labkey:wnprc16.3-48996 /bin/bash -c "mkdir /tmp/packer/ && cd /tmp/packer && echo 'Cloning lkpm-packer...' && git clone https://github.com/WNPRC-EHR-Services/lkpm-packer.git . -q && echo 'Running npm install...' && npm install --silent &>/dev/null && echo 'Compiling Typescript...' && tsc && node ./lkpm-packer pack"Then, copy out the labkey.pack file and remove the container:
docker cp labkey_pack:/tmp/labkey.pack ./
docker rm labkey_packInstalling the pack file
To install a pack file to a checked out module:
# Set the module base
MOD_BASE=~/Desktop/GitHub/WNPRC-EHR/
# Make the containing directory
mkdir -p $MOD_BASE/lkpm/base
# Unpack
./lkpm-packer unpack ./labkey.pack $MOD_BASE/lkpm/baseEventually, lkpm setup should be able to pack and unpack the the dependencies for you.
0.1.0
9 years ago