목록전체 글 (77)
4번독수리의 둥지
FROM alpine:latest RUN apk --update add ca-certificates FROM scratch FROM can appear multiple times within a singleDockerfileto create multiple images or use one build stage as a dependency for another. Simply make a note of the last image ID output by the commit before each new FROM instruction. Each FROM instruction clears any state created by previous instructions. https://docs.docker.com/eng..
AWS ECS를 이용하여 서비스를 개발하고 있는데 기존에는 도커 이미지 안에 DB 비밀번호가 포함되어 있던 상황. 개선을 위해 AWS Secrets Manager를 사용하기로 하였다. 다행히 서비스에 필요한 여러 값들은 환경 변수를 설정하여 덮어쓸 수 있게 구현해 놓았기 때문에, AWS Secrets Manager에 등록해 놓은 비밀번호를 Task의 환경변수로 밀어넣을 계획. 1. Secrets Manager에 새 secret을 생성하여 사용할 비밀번호를 등록 1) AWS콘솔 > Services > Security, Identity, & Compliance > Secrets Manager로 이동, Store a new secret로 들어감 2) Select secret type : Other type o..
package main import ( "context" "log" "os" "time" ) func main() { logger := log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile) duration, _ := time.ParseDuration("1s") ticker := time.NewTicker(duration) defer ticker.Stop() for range ticker.C { ctx, cancel := context.WithTimeout(context.Background(), duration) go func(ctx context.Context) { ints := make([]int, 10) logger.Printf("%#v", ints) INTS..
package main import ( "fmt" "time" ) func main() { duration, _ := time.ParseDuration("1s") ticker := time.NewTicker(duration) defer ticker.Stop() for { select { case