docker pull lasery/cryptor
docker run --rm -it --name="cryptor" \
--tmpfs /tmp/ \
lasery/cryptor \
bash
--volumes-from blackbox \
node paper.js
Keep data
-v /tmp/:/tmp/ \
REPO=cryptor && VERSION=19.03
ARCH=amd64 && IS_CROSS_BUILD=
ARCH=arm32v6 && IS_CROSS_BUILD=true
IS_CROSS_BUILD=
TAG=${VERSION}-${ARCH}`if [ \"$IS_CROSS_BUILD\" = \"true\" ]; then echo -cross; fi`
echo $REPO:$TAG && echo $IS_CROSS_BUILD && echo $VERSION
cd ~/projects/crypto-box/apps/${REPO}
bash build.sh
Work on latest version
docker tag lasery/${REPO} lasery/${REPO}:${TAG}
Mount and run
docker run -it --rm --name="$REPO"-dev \
-v $(pwd)/app:/usr/src/app \
lasery/${REPO}:${TAG} \
bash
Test
yarn test
Cross run
-v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static \
curl --request POST https://cloud.docker.com/api/build/v1/source/b590532d-08a2-492f-82cb-57ef4fe3ca75/trigger/d76f112f-7fe5-4259-a106-f067919bfe4a/call/
docker build \
-t lasery/${REPO}:${TAG} \
-f Dockerfile.${ARCH}$(if [ \"$IS_CROSS_BUILD\" = \"true\" ]; then echo .cross; fi) \
.
--cache-from lasery/${REPO} \
Update/Install new package
(if necessary) rm -rf /node_modules/*
yarn install
yarn add
yarn list
mv yarn.lock yarn.amd64.lock
mv yarn.lock yarn.arm32v6.lock
Copy node_modules to local drive
mkdir node_modules
-v $PWD/node_modules/:/tmp/node_modules/ \
cp -rf /node_modules/. /tmp/node_modules/
export DOCKER_CLI_EXPERIMENTAL=enabled
docker manifest create lasery/${REPO} lasery/${REPO}:$VERSION-amd64 lasery/${REPO}:$VERSION-arm32v6
docker manifest annotate lasery/${REPO} lasery/${REPO}:$VERSION-amd64 --arch amd64
docker manifest annotate lasery/${REPO} lasery/${REPO}:$VERSION-arm32v6 --arch arm
docker manifest push -p lasery/${REPO}
docker manifest inspect lasery/${REPO}
docker pull lasery/cryptor:latest