HUB
Sign inSign up

lasery/cryptor

By lasery

•Updated over 7 years ago

Image
0

1.9K

lasery/cryptor repository overview

⁠Usage

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/ \

⁠Development

⁠Set enviornment

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

⁠Start the program

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 \

⁠Build image

  • Docker cloud auto-build
curl --request POST https://cloud.docker.com/api/build/v1/source/b590532d-08a2-492f-82cb-57ef4fe3ca75/trigger/d76f112f-7fe5-4259-a106-f067919bfe4a/call/
  • Local
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/

⁠Multiple Archi

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}

⁠Issues

  • bitcore-message is holding other package versions: bitcore-lib, bitcore-mnemonic

⁠TODO

  • Capture Ctrl-C to exit and return menu
Tag summary
Recent tags
Content type
Image
Digest
Size
405.7 MB
Last updated
over 7 years ago
docker pull lasery/cryptor:latest