반응형
[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
반응형
'Web Dev' 카테고리의 다른 글
[Docker] : docker image 삭제 방법 (0) | 2023.02.17 |
---|---|
[Docker] : Docker에서 API 패키징 하는 방법 + Port 포워딩 ! (0) | 2023.02.17 |
[Docker]DockerHub 사용법 총정리 : Docker 설치 및 실행 (0) | 2023.02.15 |
React Native로 크로스 플랫폼 웹뷰앱 만들기 (0) | 2023.02.10 |
Apollo Server를 사용하여 GraphQL 서버 구현 해보자 ! (0) | 2023.02.01 |
<img> 태그 확대 CSS (0) | 2023.01.26 |