Debug CodeBuild with custom image

AWS CodeBuild is managed service for helping continuous integration and deployment. In CodeBuild, we normally use managed container image provided Amazon, it contains almost runtimes like android, dotnet, golang and more. We’re usually satisfied the managed image, but sometimes need to use custom image you build, CodeBuild can run on it. When debugging in CodeBuild, we can log in the container running by codebuild, it’s very convenience. To use the function, we set codebuild-breakpoint in buildspec file....

June 4, 2021 · 1 min · waneal

`terraform console` is convenience

I’m using terraform in my company, and I like it. We don’t have to memorize all expressions of terraform to use it because of IDE’s auto complement function. In addition, sometimes I want to test some expressions quickly. terraform console can help it. > terraform console > [for s in ["a", "b", "c"] : upper(s)] [ "A", "B", "C", ] It is convenience for check values of data and resources because this command can read values in current tfstate....

May 28, 2021 · 1 min · waneal

Configure base image by argument

It is rare case, but sometimes I have to configure base image by command argument while executing docker build. For example, there are two AWS account, and I use base image contained in each ECR (Elastic Container Registry) for each account. Even I have two base image, but I should use only one Dockerfile. In this case, this solution help me. Dockerfile ARG BASE_IMAGEFROM${BASE_IMAGE}:latestRUN hogehoge Command $ docker build --build-arg BASE_IMAGE=XXXXXXXX....

May 27, 2021 · 1 min · waneal

Switch email and name for each Git repository

Sometimes, I would like to switch user.name and user.email of git configuration. For example, I have two GitHub account, for business and for private. When I push some commits to repositories through the same laptop, name and email must be configured correctly for appropriate repository. In this case, we should set up user configuration for each repository. We can use below commands. $ cd YOUR_REPOSITORY $ git config --local user.name "hogehoge" $ git config --local user....

May 22, 2021 · 1 min · waneal

Executable files information of go

go version -m can print module dependency of executable file’s code. > go version -m /usr/local/bin/peco /usr/local/bin/peco: go1.14.5 path command-line-arguments mod github.com/peco/peco (devel) dep github.com/google/btree v0.0.0-20161213163243-0c3044bc8bad h1:IIXE5Gtu2VS7SL3lhB61iSliE+jpOwuYDYAH4HGxGwY= dep github.com/jessevdk/go-flags v1.1.0 h1:Geou1o2RJhW9nUu+puVL2ASZMWjfj6+uy97+byGKL98= dep github.com/lestrrat-go/pdebug v0.0.0-20180220043849-39f9a71bcabe h1:S7XSBlgc/eI2v47LkPPVa+infH3FuTS4tPJbqCtJovo= dep github.com/mattn/go-runewidth v0.0.0-20161012013512-737072b4e32b h1:idzeyUe3K4aU/SIZWMykIkJJyTD7CgDkxUQEjV07fno= dep github.com/nsf/termbox-go v0.0.0-20190817171036-93860e161317 h1:hhGN4SFXgXo61Q4Sjj/X9sBjyeSa2kdpaOzCO+8EVQw= dep github.com/pkg/errors v0.0.0-20161029093637-248dadf4e906 h1:aXc/AM323HlkOXjl3QuSO06wbXK45HrzBT+pwVOufXg= https://golang.org/pkg/cmd/go/internal/version/

May 16, 2021 · 1 min · waneal