This will get it going:
$ docker run -itd --name dynamodb-local -p 8000:8000 rbekker87/dynamodb-local:latest
For Data Persistence:
| export VERSION="3.7.1" | |
| xcode-select --install | |
| brew update | |
| brew upgrade | |
| brew install zlib | |
| brew reinstall zlib | |
| export LDFLAGS="-L/usr/local/opt/zlib/lib" | |
| export CPPFLAGS="-I/usr/local/opt/zlib/include" | |
| pyenv install $VERSION | |
| pyenv global $VERSION |
| // This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally | |
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "golang.org/x/crypto/ssh" |
| import functools | |
| def force_async(fn): | |
| ''' | |
| turns a sync function to async function using threads | |
| ''' | |
| from concurrent.futures import ThreadPoolExecutor | |
| import asyncio | |
| pool = ThreadPoolExecutor() |
Here's my setup:
Complete up to the "Generate the cert" section in this gist
| # Image neeeds to have ssh-client | |
| image: docker:git | |
| services: | |
| - docker:dind | |
| stages: | |
| - staging | |
| before_script: | |
| - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY |
| #!/usr/bin/env python3 | |
| import hashlib | |
| def hash_string(string): | |
| """ | |
| Return a SHA-256 hash of the given string | |
| """ | |
| return hashlib.sha256(string.encode('utf-8')).hexdigest() |
| #!/bin/bash | |
| mkdir -p out | |
| for img in `grep image $1| sed -e 's/^.*image\: //g'`; | |
| do | |
| cleanname=${img/\//-} | |
| tag=`docker images | grep $img | awk '{print $2}'` | |
| echo "Exporting image: $img, tag:$tag ($cleanname)..." | |
| docker save $img -o out/$cleanname.tar |