[bash] / bin / sh : apt-get : 찾을 수 없음

aspell과 함께 작동하도록 dockerFile을 변경하려고합니다. 도크에 감싸고 싶은 bash 스크립트가 있습니다.

Step 4: Wrap the script in a Docker container.

The sample SDK we downloaded earlier contains an example of an action wrapped in a Docker container. In particular, the sample SDK includes a Dockerfile that builds the C program in client/example.c and installs the binary as /blackbox/client/action .

The key line in the sample Dockerfile is:

RUN cd /blackbox/client; gcc -o action example.c

Instead of compiling example.c and installing the binary as an action, well change the Dockerfile to install aspell into the Linux environment, and then install our action.sh script as the executable action command.

To do so, we delete the RUN command above, and insert the following commands into the Dockerfile:

RUN apt-get install -y aspell
RUN rm -f /blackbox/client/action
ADD action.sh /blackbox/client/action

나는 아래의 dockerfile에서 이것을하려고합니다.

# Dockerfile for example whisk docker action
FROM openwhisk/dockerskeleton

ENV FLASK_PROXY_PORT 8080

### Add source file(s)
ADD example.c /action/example.c

RUN sudo apt-get install -y aspell
RUN rm -f /blackbox/client/action
ADD action.sh /blackbox/client/action



CMD ["/home/huseyin/bin", "-c", "cd actionProxy && python -u actionproxy.py"]

튜토리얼이 오래되어서 성공할 수 없습니다. 도와주세요?



답변

사용중인 이미지 입니다 알파인 기반으로 사용하지 수 있도록 apt-get이 우분투의 패키지 관리자이기 때문에.

이 문제를 해결하려면 다음을 사용하십시오.

apk updateapk add


답변

이미지를 생성하는 동안 dockerfile 내부를보고 있다면 다음 줄을 추가하십시오.

RUN apk add --update yourPackageName


답변