도커파일을 아래와 같이 작성하면, cmd와 bin이라는 폴더 자체를 옮기는게 아니라 두 폴더 안의 내용물들이 모두 나래비된다. FROM golang:latest LABEL maintainer="ingnoh@tistory.com" WORKDIR /ingnoh # bin과 cmd는 폴더 COPY bin cmd go.mod go.sum main.go /ingnoh/ # for m1 mac ENV GOOS=darwin \ GOARCH=arm64 CMD [ "go", "build", "-o", "/ingnoh/bin/my_binary" ] 때문에 bin과 cmd 폴더 자체를 옮겨서 컨테이너 내부에서도 폴더 구조를 유지하고자 한다면 다음과 같이 작성해야 한다. FROM golang:latest LABEL maint..
아래와 같은 패키지 구조가 있다고 하자. [my_first_go] tree -L 3 . └── src ├── helper │ ├── my_first_helper.go │ └── my_second_helper.go └── main.go [my_first_go] 이 때, 각 파일은 다음과 같은 내용을 포함한다. // main.go package main func main() {} // my_first_helper.go package helper import "fmt" func RunFirstHelper() { fmt.Println("Running first helper!!!") } // my_second_helper.go package helper import "fmt" func RunSecondHelper..
@ActiveProfiles("local") @AutoConfigureWebTestClient @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class CreateTaskHashTest: BehaviorSpec() { @Autowired private lateinit var client: WebTestClient init { // ...테스트 코드 작성 } } 요렇게 작성했는데도 NoSuchBeanDefinitionException이 뜨는 경우, 아래와 같은 dependency를 추가하자. // build.gradle.kts dependencies { // ...생략 implementation("org.springf..
임의의 테라폼 버전을 설치하기 위해 /usr/local/bin 디렉토리로 옮기려는 중, 아래와 같은 문제가 발생하였다! [~] mv ~/Downloads/terraform /usr/local/bin/terraform mv: rename /Users/ingnoh/Downloads/terraform to /usr/local/bin/terraform: Not a directory [~] 그래서 /usr/local 위치에 가보니 bin이 뜬금없이 디렉토리가 아닌 바이너리 형태로 존재하는 기현상을 확인하였다. [~] cd /usr/local [local] ls -al total 32 drwxr-xr-x 4 root wheel 128 3 7 09:14 . drwxr-xr-x@ 11 root wheel 352 1 1..
CloudFront Signed URL을 만드는 과정에서, 문자열로 된 RSA Key를 아래와 같은 코드를 통해 java.security.PrivateKey 인스턴스로 변환하고자 했다. internal fun String.convertToPrivateKey(): PrivateKey { val keyData = this.replace("-----BEGIN RSA PRIVATE KEY-----\n", "") .replace("-----END RSA PRIVATE KEY-----", "") .replace("\n", "") val keyBytes = Base64.getDecoder().decode(keyData) val keySpec = PKCS8EncodedKeySpec(keyBytes) return Key..
내 경우에는 다음과 같은 흐름에서 해당 이슈가 발생하였다. 로컬 환경을 기반으로 zookeper와 kafka 실행 ctrl+c 따위의 명령어로 이들을 모두 종료한 후 다른 짓 다시 실행했을 때, zookeper는 잘 올라오지만 kafka는 다음과 같은 로그와 함께 실행되지 않음 [2023-02-28 22:24:49,384] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) kafka.common.InconsistentClusterIdException: The Cluster ID IFnjWyYcROOKY57-iqsdPg doesn't match stored clusterId Some(9Kdz..
Windows를 기준으로 사용할 수 없는 문자는 \/:*?"|이고, 파일 명은 온점(.)으로 끝나지 않아야 한다. 요 내용을 정규식으로 표현하면, const regex = /([\\/:*?\"|])|(\.$)/g; 이제 이걸 토대로 String.prototype.replace와 encodeURIComponent를 조합하면 결과는 다음과 같다. const regex = /([\\/:*?\"|])|(\.$)/g; const target = '/\:?"|:\':S.text*.'; const result1 = target.replace(regex, (match) => { return encodeURIComponent(match); }); console.log(result1); // %3C%3E%2F%3A%3F%..
- Total
- Today
- Yesterday
- IntelliJ
- Spring Cloud Config
- dev
- Linux
- Database
- postgresql
- jQuery
- etc
- eureka
- AWS IoT
- mysql
- JPA
- shell
- Docker
- AWS
- terraform
- Vault
- Gradle
- spring boot
- 코딩테스트
- Node.js
- pgloader
- JEST
- react
- Java
- Puppeteer
- hashicorp
- Git
- kotlin
- javascript
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |