Docker: /bin/sh: 1: /tmp/provision.sh: not found - docker

I'm trying to deploy the latest scrapinghub/splash
I am using git-bash on win10. I forked the repo to https://github.com/kc1/splash/blob/master
and I have been trying to follow Using docker, scrapy splash on Heroku to modify the docker file
to https://github.com/kc1/splash/blob/master/Dockerfile
but when I run:
$ heroku container:push web --app splash1
=== Building web (E:\ENVS\r3\splash1\Dockerfile)
Sending build context to Docker daemon 5.333MB
Step 1/11 : FROM ubuntu:16.04
---> 2a697363a870
Step 2/11 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> d65460bd23ae
Step 3/11 : ENV PATH="/opt/qt59/5.9.1/gcc_64/bin:${PATH}"
---> Using cache
---> f8ad62632743
Step 4/11 : ADD dockerfiles/splash/provision.sh /tmp/provision.sh
---> Using cache
---> 5fc632a5001f
Step 5/11 : ADD dockerfiles/splash/qt-installer-noninteractive.qs /tmp/script.qs
---> Using cache
---> 174d06a23d89
Step 6/11 : RUN /tmp/provision.sh prepare_install install_deps install_qtwebkit_deps install_official_qt install_qtwebkit install_pyqt5 install_python_deps
install_flash install_msfonts install_extra_fonts remove_builddeps remove_extra && rm /tmp/provision.sh
---> Running in 45dd729ec969
/bin/sh: 1: /tmp/provision.sh: not found
The command '/bin/sh -c /tmp/provision.sh prepare_install install_deps install_qtwebkit_deps install_official_qt install_qtwebkit install_pyqt5 install_pyth
on_deps install_flash install_msfonts install_extra_fonts remove_builddeps remove_extra && rm /tmp/provision.sh' returned a non-zero code: 127
! Error: docker build exited with Error: 127
What am I doing wrong?

Related

Can not connect redis-vm server using docker

I have use the Ubuntu Virtualbox.
Docker version : Docker version 20.10.12, build e91ed57
redis version: 3.0
From Ubuntu, I'm trying to initialize and connect to redis-vm server.
I have use following docker commands to build, create container and connect with the redis-server.
(base) root#adminsaturn-virtual-machine:/media/sf_scefwp01/redis# docker build --rm -f ./Dockerfile --tag redis:3.0 .
Sending build context to Docker daemon 1.571MB
Step 1/26 : FROM alpine:20210804 as redis-dev
---> 4e873038b87b
Step 2/26 : ENV REDIS_VERS "6.2.6"
---> Using cache
---> bd2bd3468229
Step 3/26 : ENV REDIS_REPO "https://github.com/redis/redis.git"
---> Using cache
---> 51831b501b6d
Step 4/26 : ENV REDISJSON_VERS "2.0.6"
---> Using cache
---> c9fbf3a205bc
Step 5/26 : ENV REDISJSON_REPO "https://github.com/RedisJSON/RedisJSON.git"
---> Using cache
---> a4d2767081c9
Step 6/26 : RUN apk add --no-cache coreutils gcc g++ cargo linux-headers make musl-dev git rust cargo clang-libs pkgconf
---> Using cache
---> a603a024df55
Step 7/26 : RUN git clone --depth 1 --branch ${REDIS_VERS} ${REDIS_REPO} redis && cd /redis && make -j "$(nproc)" && make install
---> Using cache
---> b784b1ea27e4
Step 8/26 : FROM alpine:3.14
---> dd53f409bf0b
Step 9/26 : RUN sed -i 's/https/http/' /etc/apk/repositories
---> Using cache
---> d5f72fd3c94e
Step 10/26 : RUN apk update && apk add bash
---> Using cache
---> fe89e27870d6
Step 11/26 : RUN apk add libgcc
---> Using cache
---> d4f8dec09ec0
Step 12/26 : RUN apk add --no-cache python3
---> Using cache
---> 558f61bd0567
Step 13/26 : RUN apk add --no-cache py3-pip
---> Using cache
---> f21fc80a1225
Step 14/26 : RUN pip3 install redis
---> Using cache
---> 634aae092977
Step 15/26 : RUN pip3 install pytest
---> Using cache
---> f03644be4ca8
Step 16/26 : COPY sysvar-py/ /sysvar-py/
---> Using cache
---> ca867b2bbc2e
Step 17/26 : ENV REDIS_URL=redis://localhost:6379
---> Using cache
---> 8e4ece4479d3
Step 18/26 : COPY startup/ /startup/
---> Using cache
---> fefed1c53dee
Step 19/26 : COPY --from=redis-dev /usr/local/bin/redis-* /usr/local/bin/
---> Using cache
---> 110bb43f3cfc
Step 20/26 : RUN mkdir /etc/redis
---> Using cache
---> 80f3fc513310
Step 21/26 : COPY --from=redis-dev /redis/redis.conf /etc/redis/
---> Using cache
---> 0fc7280f6738
Step 22/26 : RUN mkdir -p /usr/local/etc/redis
---> Using cache
---> 362645872a09
Step 23/26 : COPY redis.conf /usr/local/etc/redis/
---> Using cache
---> 9c545d22358f
Step 24/26 : EXPOSE 6379/tcp
---> Using cache
---> d41a476122fd
Step 25/26 : WORKDIR /sysvar-py
---> Using cache
---> 0cd5f4246142
Step 26/26 : ENTRYPOINT ["/startup/startup.sh"]
---> Using cache
---> 20ee87c5f5f4
Successfully built 20ee87c5f5f4
Successfully tagged redis:3.0
(base) root#adminsaturn-virtual-machine:/media/sf_scefwp01/redis# docker run --name=redis --publish=6379:6379 --hostname=redis --mount type=bind,source=/run,target=/run --detach redis:3.0
1fe16baec197920588783968fea43ceaba8286117d95b49e4d59b5a840d04241
(base) root#adminsaturn-virtual-machine:/media/sf_scefwp01/redis# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1fe16baec197 redis:3.0 "/startup/startup.sh" 5 seconds ago Exited (1) 4 seconds ago redis
c1aa99b92eca redis "docker-entrypoint.s…" 25 hours ago Exited (0) 25 hours ago funny_nobel
e236678456e2 redis "docker-entrypoint.s…" 25 hours ago Exited (0) 25 hours ago quirky_lovelace
2772ad6a9c9b 4e873038b87b "/bin/sh -c 'apk upd…" 28 hours ago Exited (2) 28 hours ago crazy_cohen
f34c6d1fde05 4e873038b87b "/bin/sh -c 'apk upd…" 28 hours ago Exited (2) 28 hours ago ecstatic_taussig
(base) root#adminsaturn-virtual-machine:/media/sf_scefwp01/redis# docker exec -it redis bash
Error response from daemon: Container 1fe16baec197920588783968fea43ceaba8286117d95b49e4d59b5a840d04241 is not running
Here you can see build and container creating successfully but redis-server exited immediately.
if we apply the docker exec -it redis bash command then getting Error response:Container is not running.
how can I fix this issue?
Kindly provide me suggestion.

Shell script failing on mkdir in Dockerfile

Have a Shell script as follows
ENV HOME=/home
RUN mkdir $HOME
Above script is in a Docker file and getting exception as follows
[91mmkdir: missing operand
Try 'mkdir --help' for more information.
Build step 'Docker Build and Publish' marked build as failure
I just tried with a Dockerfile like this:
FROM scratch
ENV HOME=/home
RUN mkdir $HOME
and got that:
$ docker build .
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM scratch
--->
Step 2/3 : ENV HOME=/home
---> Running in e9d03ee00aa7
Removing intermediate container e9d03ee00aa7
---> 16f6e2ba2f09
Step 3/3 : RUN mkdir $HOME
---> Running in 6847b9b34717
failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown
$
Then I edited the file to look like this:
FROM mariadb
ENV HOME=/home
RUN mkdir $HOME
and got that:
$ docker build .
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM mariadb
---> ea81af801379
Step 2/3 : ENV HOME=/home
---> Running in 7d903215da74
Removing intermediate container 7d903215da74
---> 77276b970083
Step 3/3 : RUN mkdir $HOME
---> Running in f120f966144f
mkdir: cannot create directory '/home': File exists
The command '/bin/sh -c mkdir $HOME' returned a non-zero code: 1
$
From the error message I can see the $HOME variable would not have been an issue. It should have worked on your side as well.

Docker - Node js app docker run command error in windows container

I have a NODE.js application which will run only in the Windows environment.
I am running docker desktop on windows 10 Enterprise edition. Docker server version: 20.10.14. So I have switched to the windows container in the docker desktop to create a windows container.
When I am running the container using the docker run command, the container does not start and throws the error.
C:\Users\app>docker run -d helloapp:latest -p 8085:8085
7286c4a0d38c87ec09c009a59cdda527f939f7e7b2814c2324f52cd454744658.
docker: Error response from daemon: container 7286c4a0d38c87ec09c009a59 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(174)\vmcomputeagent.exe!00007FF67F5BC00A: (caller: 00007FF67F58ECEA) Exception(2) tid(36c) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\ComputeSystemManager_ExecuteProcess\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000].
Here is my docker file:
FROM customnode/node:12.14.1
RUN mkdir C:\\applications\\docker-firstapp
COPY myfirstapp C:\\applications\\docker-firstapp
WORKDIR C:\\applications\\docker-firstapp
RUN npm install
ENV PORT=8085
ENV SQL_USER=username
ENV SQL_PASSWORD=passwd
ENV SQL_SERVER=serverip
ENV SQL_SERVER_DB=dbname
ENV SQL_SERVER_PORT=1433
RUN npm run build
CMD ["npm", "run prod", "--port 8085"]
My folder structure:
*+--- myfirstapp
--- .dockerignore
--- Dockerfile*
For building the image:
docker build -t helloapp .
For running the container:
docker run -d helloapp:latest -p 8085:8085
Docker build logs:
C:\Users\app>docker build -t helloapp .
Sending build context to Docker daemon 12.85MB
Step 1/12 : FROM customnode/node:12.14.1
12.14.1: Pulling from customnode/node
e46122273a4e: Pull complete
c37a24ce81a9: Pull complete
Digest: sha256:ccd9d53710c8b8f8fd4bb779afe79bhd8d45dugf44c4ddf7b7f655ea5cbfe540550cd892c
Status: Downloaded newer image for customnode/node:12.14.1
---> 2cb9637cf0ec
Step 2/12 : RUN mkdir C:\\applications\\docker-firstapp
---> Running in b5c9bc1fabe0
Removing intermediate container b5c9bc1fabe0
---> bc300a981554
Step 3/12 : COPY myfirstapp C:\\applications\\docker-firstapp
---> b039e12ed5de
Step 4/12 : WORKDIR C:\\applications\\docker-firstapp
---> Running in a522ca627602
Removing intermediate container a522ca627602
---> fe67791910c9
Step 5/12 : RUN npm install
---> Running in 796e435a9ecf
added 628 packages from 996 contributors in 63.929s
Removing intermediate container 796e435a9ecf
---> 2301e525f348
Step 6/12 : ENV PORT=8085
---> Running in 43b2cfe4f50b
Removing intermediate container 43b2cfe4f50b
---> 56babd0dfc87
Step 7/12 : ENV SQL_USER=username
---> Running in 7a7b5c3164c3
Removing intermediate container 7a7b5c3164c3
---> cff0b54056f6
Step 8/12 : SQL_PASSWORD=passwd
---> Running in 162832e5b80d
Removing intermediate container 162832e5b80d
---> c4cc16d73439
Step 9/12 : ENV SQL_SERVER=serverip
---> Running in 22f010aaa9c6
Removing intermediate container 22f010aaa9c6
---> fba9cb278a2a
Step 10/12 : ENV SQL_SERVER_DB=dbname
---> Running in 37f14891e5ed
Removing intermediate container 37f14891e5ed
---> 22477a823bdd
Step 11/12 : ENV SQL_SERVER_PORT=1433
---> Running in a0b9ec381efd
Removing intermediate container a0b9ec381efd
---> 30bc3fb6d543
Step 12/12 : RUN npm run build
---> Running in f6b3b0c7ec9b
> nodewithtypescript#1.0.0 build C:\applications\docker-firstapp
> tsc
Removing intermediate container f6b3b0c7ec9b
---> da1352245135
Step 12/12 : CMD ["npm", "run prod", "--port 8085"]
---> Running in 744719faa7c3
Removing intermediate container 744719faa7c3
---> 1912b73a80d5
Successfully built 1912b73a80d5
Successfully tagged helloapp:latest

docker build run paused ,can any one help me

its very strange,when i run docker build ,process paused,just as follows:
docker build -t registry.ap-southeast-1.aliyuncs.com/joyours_dev/cronjobonlinebackgroundtask:v1 -f Dockerfile.prod .
Sending build context to Docker daemon 25.14MB
Step 1/13 : FROM nginx
---> c316d5a335a5
Step 2/13 : COPY ./app /home/
---> Using cache
---> b3b5594156ff
Step 3/13 : WORKDIR /home
---> Using cache
---> e9fcfe5da215
Step 4/13 : ARG PROJECT_DIR=/var/petaplay/simplethai
---> Using cache
---> fa19c2174392
Step 5/13 : ARG MICROSERVICE_DIR=/var/petaplay/simplethai/microservice/
---> Using cache
---> c086111be060
Step 6/13 : ARG SERVICE_NAME=onlineservice
---> Using cache
---> e0e2035a756b
Step 7/13 : RUN mkdir -p $PROJECT_DIR/common/config
---> Running in 9b38ed579980
console stop at Step 7/13,

When build beego docker image with default docker file, show error: `godep: No Godeps found (or in any parent directory)`

I'm new to Go & Beego.
When I build docker image with beego's default docker file, it shows this error :
godep: No Godeps found (or in any parent directory)
The build info is:
Sending build context to Docker daemon 13.6MB
Step 1/9 : FROM library/golang
---> 138bd936fa29
Step 2/9 : RUN go get github.com/tools/godep
---> Running in 9003355d967f
---> bae9e4289f9b
Removing intermediate container 9003355d967f
Step 3/9 : RUN CGO_ENABLED=0 go install -a std
---> Running in 63d367bd487e
---> 3ce0b2d47c0a
Removing intermediate container 63d367bd487e
Step 4/9 : ENV APP_DIR $GOPATH/src/TestProject
---> Running in 53ddc4661a07
---> 528794352eb0
Removing intermediate container 53ddc4661a07
Step 5/9 : RUN mkdir -p $APP_DIR
---> Running in 37718f358f5c
---> ef9332ca086c
Removing intermediate container 37718f358f5c
Step 6/9 : ENTRYPOINT (cd $APP_DIR && ./TestProject)
---> Running in 059c06321914
---> 8538ea070871
Removing intermediate container 059c06321914
Step 7/9 : ADD . $APP_DIR
---> df129482c662
Step 8/9 : RUN cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s'
---> Running in 50b29d1307b5
godep: No Godeps found (or in any parent directory)
The command '/bin/sh -c cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s'' returned a non-zero code: 1
The solution is very simple: run godep save in your project locally, and you will go a new folder Godeps in your project. it contains file:Godeps.json. After this, run docker build . again, you will got your docker image.

Resources