Category : sh

I need to create an .sh script that will make next commands: Connect to the container: docker exec -it container_name /bin/bash Set venv environment: . /home/username/venv_py3/project/bin/activate Run the command that makes some long procedures and see its output: pytest /tests/ I’m trying just to set that commans in the .sh file in the correct order ..

Read more

I’m trying to run this fastify-example project created by one of the lead maintainers locally. I’m using Ubuntu 20.04 VM. These are the scripts from package.json: "scripts": { "test": "standard && tap test/**/*.test.js", "start": "fastify start -l info app.js", "dev": "npm run build && fastify start -w -l info -P app.js", "build": "rollup -c", "elasticsearch": ..

Read more

I’m trying to declare one env var with a Script in my dockerfile. Dockerfile COPY ./Service/conf/preproduction.cfg /config/preproduction.cfg COPY ./Service/conf/production.cfg /config/acalls-service/production.cfg COPY ./entrypoint.sh ./ RUN ["chmod", "+x", "./entrypoint.sh"] ENTRYPOINT ["./entrypoint.sh"] Script #!/bin/bash profile=$profile export SETTINGS=/config/acalls-service/${profile}.cfg python -m "acalls_clasiffier" exec When I tried to use "set" Settings doesn’t appear but if I run the exact command inside ..

Read more

I get this error: rabbit_mqtt_broker | Initializing … rabbit_mqtt_broker | sleep: invalid time interval ‘3r’ rabbit_mqtt_broker | Try ‘sleep –help’ for more information. rabbit_mqtt_broker exited with code 0 Dockerfile: FROM rabbitmq:3-management RUN mkdir -p /scripts COPY init.sh /scripts WORKDIR /scripts RUN chmod +x init.sh RUN rabbitmq-plugins enable rabbitmq_web_mqtt ENTRYPOINT ["/bin/bash"] CMD ["./init.sh"] init.sh #!/bin/sh echo ..

Read more

I am trying to build the image with: docker build -t db-demo . But i get RUN mkdir -p /usr/src/app: #5 0.512 mkdir: cannot create directory ‘/usr/src/app’: Permission denied The Dockerfile FROM mcr.microsoft.com/mssql/server RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY . /usr/src/app RUN chmod +x /usr/src/app/run-initialization.sh ENV SA_PASSWORD bpassword ENV ACCEPT_EULA Y ENV MSSQL_PID Express ..

Read more

I download and install Go programming language like this: curl -OL https://golang.org/dl/go1.17.3.linux-amd64.tar.gz tar -C /usr/local -xvf go1.17.3.linux-amd64.tar.gz touch /etc/profile.d/go.sh echo "export PATH=$PATH:/usr/local/go/bin" >> /etc/profile.d/go.sh source /etc/profile.d/go.sh And it works. But I want to create a Docker image containing Go and ready to use. So I did like this in Dockerfile: RUN curl -OL https://golang.org/dl/go1.17.3.linux-amd64.tar.gz RUN ..

Read more

I am using Windows 10, and working on a Django Project with Docker. If I run a python command from inside docker container, it runs perfectly. E:path>docker exec -it my_docker_container bash [email protected]:/app# python manage.py makemigrations authentication No changes detected in app ‘authentication’enter code here But when I try to run same command using a .sh ..

Read more