
20 Ene
Instalar Poetri CLI con Docker y Ubuntu 18.04
en Tecnología
Comentarios
Paso 1 para instalar Poetri CLI:
Configurar ambiente
Lanzar contenedor
docker run -d --name poetri-machine -it ubuntu:18.04 /bin/bash
docker exec -it poetri-machine /bin/bash
Instalar Node, NPM, Poetri CLI y Git
- nodejs: 8.10.0
- npm: 3.5.2
- poetri: 0.1.2
- git: 2.17.1
apt update
apt install -y nodejs npm git
node --version && npm --version && git --version
npm install -g @poetri/cli
Paso 2: Publicar función en Poetri Marketplace
Generar llave SSH
apt install -y openssh-client
ssh-keygen -t rsa

Autenticarse en GIT
git config --global user.email "user@myemail.com"
git config --global user.name "Name"
Crear cuenta
poetri signup

Autenticarse en Poetri
poetri login

Crear proyecto
cd /home/
mkdir poetri
cd poetri/
poetri init

Crear función
cd verify-academic-certificates/
poetri function create

Editar función
cd verify-certificate/
apt install -y nano
nano handler.js

Definir la lógica de nuestra función.

Paso 3: Publicar función
git push poetri master

Detener contenedor
docker stop poetri-machine && docker rm poetri-machine
Miscelánea
Verificar cuál es el usuario que inició sesión
nano ~/.netrc