Press "Enter" to skip to content

[카테고리:] 컴퓨터

mac에서 docker-compose up -d 에서 error getting credentials – err 에러 날 경우

에러 메시지

bash-3.2# sudo docker-compose up -d
2023/12/10 12:09:16 must use ASL logging (which requires CGO) if running as root
2023/12/10 12:09:16 must use ASL logging (which requires CGO) if running as root
[+] Running 0/0
⠋ redis Pulling 0.0s
⠋ phpmyadmin Pulling 0.0s
error getting credentials – err: exit status 1, out: “

~/.docker/config.json 파일을 열어본다.

만일 아래와 같이 설정되어 있으면,

{
  "credsStore": "desktop"
}

다음과 같이 변경한다.

{
  "credsStore": "osxkeychain"
}

php 한달전 날짜 구하기

echo date('Y-m-d', strtotime(date('Y-m-d').'-1 month'))
echo date('Y-m-d', strtotime('-2 month')); // 2달전

쉘에서 바로 실행하기

php -r "echo date('Y-m-d', strtotime(date('Y-m-d').'-1 month'));"

50일전

echo date('Y-m-d', strtotime(date('Y-m-d').'-50 day'))

1년 후

echo date('Y-m-d', strtotime(date('Y-m-d').'+1 year'))

Y-m-d 를 Y-m-d H:i:s 로 변경하면 “연월일”을 “연월일 시분초”로 바꿀 수 있다.