Web Dev
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.[Docker : real ! 해결방법 ]
이준호
2023. 2. 15. 17:58
반응형
[Docker][해결방법] WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Dockerfile 내에서 apt 를 사용하면 "WARNING: apt does not have a stable CLI interface. Use with caution in scripts." 문구가 출력된다. apt 명령어의 경우 사용자와의 interaction 에 중점을 둔 CLI 이기에 script 내에서 사용
technote.kr
이분 것을 봐도 모르겠다 해서 오셨으면 잘 오셨습니다 .
https://devkly.com/nodejs/install-nodejs-on-docker-ubuntu/
Docker ubuntu container에서 nodejs install 하기
사실 그냥 ubuntu에서 다운받는걸 똑같이 한다. 보너스로 docker-compose.yml 파일이다 참고 How to install latest node inside a docker container
devkly.com
이분거를 보고 따라했습니다.
FROM ubuntu:20.04
RUN apt-get -qq update
RUN apt-get -qq upgrade --yes
RUN apt-get -qq install curl --yes
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get -qq install nodejs --yes
# 가상 우분투 pc가 만들어지고 nodejs가 설치가 됨 !
# 가상 우분투 pc에 파일 생성
RUN mkdir joonhocode
# 내컴퓨터에 있는걸 copy 해줘야함
# COPY ./내컴퓨터 파일 docker컴퓨터 폴더/
COPY ./index.js joonhocode/
# 가상 우분투 pc에 폴더로 이동
RUN cd ./joonhocode
RUN npm i express
RUN npm init -y
# node 실행 !
RUN node index.js
반응형