본문 바로가기

728x90

전체 글

[원도우] Spring Boot Application Docker 컨테이너로 배포 Spring Boot Application Docker 컨테이너로 배포 Spring Boot 프로젝트 만들기 Intellij로 spring boot 프로젝트 생성 : https://scbyun.com/1447 Dockerfile 파일 생성 openjdk 17 도커 이미지(docker image) : https://hub.docker.com/_/openjdk Dockerfile FROM openjdk:17.0.2-jdk ARG JAR_FILE_PATH=build/libs/demo-0.0.1-SNAPSHOT.jar COPY ${JAR_FILE_PATH} app.jar EXPOSE 8080 ENTRYPOINT ["java","-jar","/app.jar"] 도커 빌드 docker build --tag [도커허.. 더보기
Intellij로 spring boot 프로젝트 생성 Intellij로 spring boot 프로젝트 생성 java 17(LTS) 설치 - https://scbyun.com/1441 C:\Users\Administrator>java --version java 17.0.5 2022-10-18 LTS Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191) Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing) C:\Users\Administrator>echo %java_home% C:\Program Files\Java\jdk-17.0.5 인텔리제이(IntelliJ) 프로젝트 생성 Spring Initialzr 설정 Name : .. 더보기
우분투에서 Ruby 2를 설치하는 방법 우분투에서 Ruby 2를 설치하는 방법 테스트 환경 $ lsb_release -a No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 22.04.1 LTS Release:22.04 Codename:jammy 필수 패키지 설치 sudo apt-get update sudo apt-get install -y git curl libssl-dev libreadline-dev zlib1g-dev rbenv 설치 git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv.. 더보기
우분투 "sudo: cd: command not found" 오류 우분투 "sudo: cd: command not found" 오류" 오류는 sudo 명령어로 cd 명령어를 사용하려고 할 때 발생하는 것으로, cd 명령어는 디렉토리를 변경하는 내부 명령어이기 때문에 sudo와 함께 사용할 수 없습니다. cd 명령어는 현재 셸 세션에서만 작동하며 따라서 슈퍼유저(root) 권한이 필요하지 않습니다. sudo 명령어는 주로 파일 시스템 및 명령어 실행과 관련된 작업에 사용되며, 디렉토리를 변경하는데는 사용되지 않습니다. 만약 슈퍼유저 권한으로 특정 디렉토리에 접근하려면 다음과 같은 방법을 사용할 수 있습니다. 1. sudo -i를 사용한 슈퍼유저 셸 실행 슈퍼유저 권한으로 새로운 셸을 실행하여 디렉토리를 변경할 수 있습니다. sudo -i cd /path/to/direct.. 더보기
Packer를 사용하여 AWS 이미지를 빌드할 때 AWS 자격 증명을 제공하는 방법 Packer를 사용하여 AWS 이미지를 빌드할 때 AWS 자격 증명을 제공하는 방법 정적 자격 증명(static credentials) 및 공유 자격 증명 파일(shared credentials file)을 이용한 방법 Static Credentials (정적 자격 증명) 정적 자격 증명은 Packer 설정 파일에 직접 키 값을 넣어두는 방식입니다. AWS 액세스 키와 시크릿 키를 직접 설정합니다. vim aws.pkr.hcl packer { required_plugins { amazon = { version = ">= 1.1.1" source = "github.com/hashicorp/amazon" } } } locals { timestamp = regex_replace(timestamp(), "[- .. 더보기
AWS CLI를 사용하여 AMI 등록을 취소하고 EBS 스냅샷을 삭제하는 방법 AWS CLI를 사용하여 AMI(Amazon Machine Image) 등록을 취소하고 EBS 스냅샷을 삭제하는 방법 AWS CLI 명령어는 이미지를 조회하고, 이미지 등록을 해제하며, 관련된 스냅샷을 삭제하는 명령어로 올바릅니다 1. 소유한 이미지 조회 계정에 소유된 이미지의 ID를 나열합니다. aws ec2 describe-images --owners self --query 'Images[*].ImageId' 2. 특정 프로필을 사용하여 소유한 이미지 조회 지정한 프로필("scbyun"이라는 이름)을 사용하여 이미지 ID를 나열합니다. aws --profile scbyun ec2 describe-images --owners self --query 'Images[*].ImageId' --output t.. 더보기
원도우에서 packer를 설치하는 방법 원도우에서 packer를 설치하는 방법 테스트 환경 > winver Packer 설치 Packer 다운로드 https://www.packer.io/ https://developer.hashicorp.com/packer/downloads?host=www.packer.io https://releases.hashicorp.com/packer packer_1.8.5_windows_amd64.zip 파일 압축 해제 > cd C:\Users\Administrator\Downloads\packer_1.8.5_windows_amd64 > .\packer.exe --version 1.8.5 환경 변수 경로 설정 시스템 변수 > Path 편집 > "D:\app\bin" 등록 packer.exe 파일을 "D:\app\bin.. 더보기
[aws] ec2 인스턴스에 java 설치하기 ec2 인스턴스에 java 설치하기 sdk 설치 curl -s "https://get.sdkman.io" | bash Looking for a previous installation of SDKMAN... Looking for unzip... Looking for zip... Looking for curl... Looking for sed... Installing SDKMAN scripts... Create distribution directories... Getting available candidates... Prime the config file... Installing script cli archive... * Downloading... #################################.. 더보기

728x90