Quantcast
Channel: Active questions tagged bash - DevOps Stack Exchange
Browsing latest articles
Browse All 48 View Live

How do I add my IP address to the start of my terminal using the bashrc file?

I want to customise my terminal on an Amazon linux device. I have colours using $(tput setaf 33);, user name with /u but the IP address not there.#blue=$(tput setaf 33);PS1="\[${blue}]\u$(tput...

View Article



Interference of Docker CMD with su: works with su-exec but not with su?

In this bash script under Linux Alpine they have (line 8):exec su-exec "$ZOO_USER""$0""$@"As far as I know, su-exec is however an Apache httpd dependecy - can I avoid it installing it under Ubuntu and...

View Article

Exit a Makefile target called by parent without throwing an error

Let's say that I have 2 targets:test: # ... @$(MAKE) dosomething @echo test # ...dosomething: # ... @if [ -z "$(SOMETHING)" ]; then exit 0; fi @echo dosomething # ...I would like echo test to execute...

View Article

SSH connection to jenkins server

I have a absh script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for...

View Article

Defining and using bash functions in AWS CodeBuild

I thought I could slightly improve readability of repetitive sed calls when inserting secrets into a file with AWS CodeBuild. I defined a bash function:replaceConfig() { sed -i 's|{'$1'}|'${!1}'|'...

View Article


How can I use bash functions in makefile?

If I need to use something like NVM in my makefile, I run into a problem, because NVM exports some bash functions that are not available in Make, even if my shell is defined as bash in the makefile.How...

View Article

How to create a "silent" MySQL docker container?

How can I create a MySQL docker container as below in the background:root:~# root:~# docker run -e MYSQL_ROOT_PASSWORD=pass --name sql-db -p 3306:3306 mysql &[1] 137878root:~# 2020-09-01...

View Article

How to gain root access to an existing docker container?

Able to get a response from the docker hub basex container:nicholas $ nicholas $ lynx http://localhost:8984/ --dumpNo function found that matches the request.nicholas $ Ran the container as:root $ root...

View Article


docker: Error response from daemon: Conflict. The container name "/basexhttp"...

Am I even correctly following the documentation on creating and running a docker container below?[root@ ~]# [root@ ~]# docker run -d \> --name basexhttp \> --publish 1984:1984 \> --publish...

View Article


cannot get bash prompt: Error response from daemon: Container foo is not running

A basic jetty container:CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES7c10b0ca16bd jetty "/docker-entrypoint.…" 21 seconds ago Up 18 seconds 8080/tcp, 0.0.0.0:80->800/tcp,...

View Article

od output is confusing

This isn't a deploy related question, but I believe it belongs here.I've found out about the od tool yesterday, and began to fiddle with it.The question is about utf-8 encoding. See the examples:~ $...

View Article

create entry-point script to get all env variables starting with VUE_APP_ and...

I would like to Dockerize my existing vuejs app for staging , production and I used multi staged approach to create my app container and I'm using Ubuntu 18.04 and this is my,Dockerfile# build...

View Article

Command "git [command] --help" opens as HTML in my code editor - no output to...

When I type git reset --help I don't get output in the bash terminal, but a new tab opens in my code editor to reveal some dense HTML. How can I change Git's behavior to display the help message in the...

View Article


How can I get the Docker target platform inside the Build Environment /...

I'm doing multi-platform builds with buildx and would like to know if there is a way to determine what platform is currently being build so I can avoid certain steps for certain environments.For...

View Article

Access vault secret from bash script

I am looking for help on a direction on where to go from here. I have a Hasicorp Vault server running and accessible over DNS (local). I need to have a script get a secret from it then use that secret....

View Article


Why does Jenkins Pipeline script returnStatus value not match status examined...

This is my little newbie Groovy script, trying to cobble together a very beginner understanding of Jenkins Pipelines:node { stage("hello") { def var = "val" echo "${var}" def stdout = sh( script:...

View Article

Setting up CircleCI to AWS EC2 for a simple node application deployment

I have a simple node application running on the EC2 instance, everything is working just fine and I want to integrate this application with CircleCI for the continuous deployment. I have been following...

View Article


Using access tokens on Dockerfile to clone repository: RUN command error

In a Dockerfile, I'm trying to clone several Gitlab repositories that are specified in a file, one per line, using an access token passed as an environment variable set in docker-compose.yml:COPY...

View Article

ansible Unsupported parameters for (command) module:

I'm trying to run a shell command in an ansible task but I keep getting an error.This is the task item and the shell command I want to run:- name: Set File Watch Limit ansible.builtin.shell: cmd: "echo...

View Article

How to modify/allow firewall rules of a GCP instance directly from the CLI?

Is there anyway to allow the ports from CLI? I have an instance in GCP and I have installed a service which by default runs on Port:8080. I know there is an option to change the firewall rules to allow...

View Article

docker command substitution fails on gitlab

I am trying to run the following command as part of a deployment in Gitlab.TIMESTAMP=$(date +%s) docker stack deploy --with-registry-auth --compose-file $(`printf "docker-compose.%s.unimark.yaml"...

View Article


Reuse block string without processing it on the fly

I have a block of code that work fine at the moment. But reuse that code is a little ugly.pipeline { agent any stages { stage('Stage 1') { steps { script { withCredentials([...

View Article


--- Article Not Found! ---

*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***

View Article

Can you use the Secure File API if the container doesn't have bash? Like Alpine?

GitLab offers a Project-level Secure Files, the API has you add this to your .gitlab-ci.yml,test: variables: SECURE_FILES_DOWNLOAD_PATH: './where/files/should/go/' script: - curl --silent...

View Article

unzip | caution: filename not matched [closed]

I'm trying to unzip multiple files which has a prefix in common service1.zipservice-2.zipservice_3.zip and so on...Now, when I try to unzip all those files at once using the command unzip service*.zip...

View Article


Get all modified files with pipeline and Jenkins

I'm trying to get all changed files in repository, by running bash script inside Jenkins pipelinesh '''#!/bin/bashfiles=($(git whatchanged --name-only --pretty="" origin..HEAD))'''But getting...

View Article

Unable to run helm --set command in bash pipeline when using semicolon

I have a CICD pipeline in yaml which runs a bash command to run a series of helm commands.Part of the process is to insert values in the pipeline into the container which is installed by helm chart via...

View Article

Running execute-command on a Fargate task with env vars

I have a Fargate task that I'm spinning up from a CICD process in order to run a MySQL database import. The container spins up fine and, on the task container, I can access the environment variables as...

View Article

Image may be NSFW.
Clik here to view.

Terraform code in AWS deploys instance but not not running bash script

I have Terraform code in AWS deploying an instance but not not running bash script. Script runs updates, deploys apache, creates small page etc. I can connect to instance after it's deployed, but there...

View Article



Is \u the only way to output the user from .bashrc?

I can't get it to work on my Mac (catalina version 10.15.2).\u works on ubuntu when I test it but not on my Mac. I want to customize my mac terminal. Colors work fine on my Mac and it's reading the...

View Article
Browsing latest articles
Browse All 48 View Live




Latest Images