Testando Smocker

No post de hoje irei demonstrar uma ferramenta interessante que descobri nas minhas leituras diárias de newsletters. Como ele se descreve, é um servidor de mock HTTP simples e eficiente. O objetivo Trata-se do Smocker, que você pode conferir o projeto no Github: Thiht/smocker. Seu backend é escrito em Go e seu front-end é feito com React com Typescript. Para instalá-lo no meu computador, eu utilizei Docker docker run -d \ --restart=always \ -p 8080:8080 \ -p 8081:8081 \ --name smocker \ thiht/smocker Ele abre duas portas com o host, a 8080 que é a porta do servidor em si, e que você usará nos seus testes e a 8081 que é a UI....

August 23, 2020

Building multi stage docker image for node app

Today I’m going to share a very helpful tip to build smaller docker images. Whenever I can, I look to build small docker images to run my containers. When building a node application, for the most cases you can use the alpine version. The default version is 10x larger than the alpine version. node 11 4e4c445311e6 21 hours ago 894MB node 11-alpine 4b3c025f5508 21 hours ago 71.3MB But the default version contains python, that is required to build some dependencies....

November 3, 2018

Dockerized commands - Part 2

On the last post ({% post_url 2017-12-16-dockerized-commands %}), we learned how to run npm commands dockerized. But there is a little issue with that command. I tried to run yarn with the dockerized node, but I got the following error: "exec: \"yarn\": executable file not found in $PATH" The issue is, the yarn binary is on /opt folder, the same folder we were mouting and it was conflicting with the original content of the folder....

December 24, 2017

Dockerized commands

Today I will share a quick tip to improve your workflow. In the last years, the docker has gained so much popularity. As a trend, some people tend to run the applications in docker containers instead of on the host machine. After formatting my computer, I hadn’t installed all the tools I use on my development workflow and I needed to install the npm dependencies of my project. I hadn’t installed the node and npm yet, so I decided to run npm install with docker...

December 16, 2017