Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [linux]

Linux is the generic term for a UNIX-like open source operating system based on the Linux kernel. Use this tag for questions about DevOps practices, processes and tools in Linux environments.

Filter by
Sorted by
Tagged with
74 votes
9 answers
142k views

How do you back up Jenkins jobs & master configs?

I'd like to backup all Jenkins jobs and config files. What's the easiest way of doing it?
kenorb's user avatar
  • 7,871
26 votes
3 answers
25k views

Difference between chroot and Docker

I don't understand the difference between docker and chroot. Yes its nice in terms of the packaging the registry. But somehow I get the feeling its just chroot with extra bells and whistles. I know I'...
Vipin Menon's user avatar
18 votes
1 answer
6k views

How to keep configuration files automatically during apt-get upgrade or install?

When performing and apt-get update; apt-get upgrade -y on a server I encountered the message: Setting up sudo (1.8.16-0ubuntu1.5) ... Configuration file '/etc/sudoers' ==> Modified (by you or by ...
Steven K7FAQ's user avatar
14 votes
2 answers
11k views

Does Docker allow containers to be OS agnostic?

We currently use a Windows based server to host 2 VMs. One VM uses Windows with a Windows app and the other VM uses Linux with a Linux app. Is the below scenario possible? Bare server with Windows ...
nanonerd's user avatar
  • 241
10 votes
5 answers
37k views

Docker compose volume syntax valid for Windows and Linux

We have developers working on an app using both Windows and Linux. The application is built within a Docker container, and ships a docker-compose specification for the build environment. The local ...
Bruce Becker's user avatar
  • 3,603
9 votes
1 answer
10k views

Running a command as a specific user on an ec2 using ssm

Background I want to automatically configure an EC2 via a build, using the aws cli and ssm. The (manual) setup for the container looks something like this: Create an EC2 Run a shell script as root ...
Max Colledge's user avatar
9 votes
2 answers
10k views

How to pass a /dev/disk device on macOS into Linux Docker?

I've connected external HDD via USD on macOS, and I'm running Ubuntu's Docker container as: docker run -it --device=/dev/disk3 --privileged ubuntu bash but the device is not present in the container:...
kenorb's user avatar
  • 7,871
8 votes
1 answer
155 views

Debug BackendConnectionErrors from Kubernetes Service LoadBalancer sesrvice

We recently moved some of our production infrastructure to Kubernetes. Many pods are exposed through a LoadBalancer service on AWS. This creates an ELB, registers each node in the cluster with the ELB,...
ahawkins's user avatar
  • 321
7 votes
1 answer
1k views

Are NixOS and GuixSD the incoming Linux distros of DevOps?

The main advantage of these distros is the declarative approach which allows for setup to be done in the same way as you would configure a Vagrantfile or Dockerfile. In the way that Docker replaced/...
warsong's user avatar
  • 171
6 votes
6 answers
1k views

In the HashiCorp stack, where's the appropriate place to add users?

I'm in the process of building some custom Linux images using HashiCorp's Packer, which will later be deployed to Azure using HashiCorp's Terraform. The VMs created from these images will need to have ...
cori's user avatar
  • 161
6 votes
1 answer
6k views

Ansible: register variable with loop

What’s the best way to use registered variable ‘audit_tools’ to check if all items are own by root ? Do I need to use Jinja2 filter or something ? Thanks - name: Verify audit tools are own by root ...
sudoi's user avatar
  • 61
6 votes
2 answers
6k views

Docker security risks passing secrets over environment variables

I'm new to Docker and want to put my Django web application into containers. For the last couple days I'm struggling with passing credentials safe to containers. Online there is always the hint ...
user3142459's user avatar
5 votes
2 answers
5k views

How to automate Powershell's interactive Get-Credential method?

I am trying to write a python script which automates the powershell's Get-Credential method. Here is something i wrote: import subprocess COMMAND_LINE = 'powershell' powershell = subprocess.Popen(...
Vivek Lohiya's user avatar
5 votes
3 answers
3k views

How to create Golang Linux binaries using a Windows host

When go build is issued on a Windows host a .exe binary is created. How to ensure that a Linux binary is created on a Windows host? The following was tried, but did not solve the issue: GOOS=linux;...
030's user avatar
  • 13.2k
5 votes
3 answers
31k views

docker "Cannot mkdir: Permission denied"

I'm trying to run wordpress inside docker. I've been following this tutorial : https://www.sitepoint.com/how-to-use-the-official-docker-wordpress-image/ But when I run this command : docker run -e ...
Loïc's user avatar
  • 179
5 votes
1 answer
282 views

Advantages of Linux Containers over Docker

I'd like to understand the differences between Linux Containers and Docker, especially what kind of advantages Containers have in comparison to Docker.
Harshul Routhu's user avatar
5 votes
2 answers
2k views

How to automate rolling upgrades for ec2 running linux behind elastic and/or application load balancer?

Would like to ask for recommendations on ready automated solutions or templates for rolling ec2 instance upgrade on AWS, requiring a reboot with ELB/ALB. Specifically required to perform the ...
rombob's user avatar
  • 657
5 votes
1 answer
3k views

How to connect a build node to a Jenkins master?

I'd like to connect a build node to the Jenkins master. Ideally without using a web browser or being in front of the physical machine. What would be the easiest way to achieve that?
kenorb's user avatar
  • 7,871
5 votes
1 answer
169 views

Pause/Suspend guest in KVM without virsh and libvirtd

I have installed KVM without libvirt/virsh and virtualmanager. Packages which installed are kvm qemu-kvm bridge-utils libguestfs-tools How can I pause/suspend VM in this case?
user54's user avatar
  • 583
4 votes
2 answers
13k views

How to get memory usage per process with sar, sysstat?

Can I get memory usage per process with Linux? we monitor our servers with sysstat/sar. But besides seeing that memory went off the roof at some point, we can't pinpoint which process was getting ...
kokito's user avatar
  • 161
4 votes
1 answer
212 views

What's missing from this simple recipe that creates a user?

I've spun many boxes in the cloud before, but was growing tired of going through the same dance; and as I'm trying to get familiar with Chef, I figured, that's a good use case to do a little learning. ...
alexakarpov's user avatar
4 votes
2 answers
1k views

How to detect what interface has private IP in Ansible

I plan to reconfigure iptables on our servers (mostly CentOS 7, some CentOS 6) with different network configurations, some on 1Gbit interface, some on 10Gbit, some with VLANs and some with configured ...
Alexander Tolkachev's user avatar
4 votes
1 answer
7k views

Consul: how to remove dead client nodes quickly

Background: When running Consul client-mode in AWS, EC2s are constantly getting replaced, which results in a lot of dead client nodes when looking at the Consul UI or via consul members. Already ...
Casper's user avatar
  • 141
4 votes
2 answers
7k views

How to redirect tomcat logs TO console?

So I have a problem that is the reverse of what everyone else on the internet wants.. I want to take tomcat logs that are being written out to /usr/local/tomcat/logs and have them be output to console ...
Scott Shorkey's user avatar
3 votes
2 answers
9k views

using copy module with wildcards

I need to copy a database backup file from a primary server to a standby server. Since I can't use synchronize, I was following this method: copy a file from primary to the local ansible server, copy ...
BlackCrystal's user avatar
3 votes
2 answers
155 views

Is there a system which automates everything (OS release, and above) to host websites on?

This is not really a DevOps question but more of a System Automation question (which DevOps covers only a part of, by popular opinion, so I hope it's okay). I feel like some 5 USD IaaS VPS with ...
user avatar
3 votes
1 answer
1k views

Build FreeBSD Docker image using Ubuntu host OS

I know that in generally it is impossible to build FreeBSD Docker image on Linux host OS due to different kernels and sys calls. Relevant discussion. However, I would like to know maybe there is a ...
user54's user avatar
  • 583
3 votes
1 answer
8k views

GitHub Actions Runner execute commands with sudo GitHub Actions

I have a GitHub action set on self hosted Ubuntu VPS on Linode. I ran sudo ./svc.sh install and then ./svc.sh start. The runner is up and working but I have a command in my yaml file that needs to run ...
Takasur's user avatar
  • 161
3 votes
1 answer
158 views

Porting a docker container to a different Linux host OS

I'm new to Docker. I have looked at many tutorials, however, this is still not clear to me : For example, If I create a docker image on a system which is using Ubuntu as the host OS. Can I then later ...
Engineer999's user avatar
3 votes
1 answer
2k views

Azure DevOps Artifact.zip folder structure for .NET Core 3.0 application

I have an ASP.NET Core 3.0 application for which I have a full CI/CD setup in Azure DevOps. The Application is hosted on a Ubuntu 18.04 server machine. In the Build Pipeline, the solution is built ...
Ned Flanders's user avatar
3 votes
1 answer
3k views

docker-credential-desktop.exe not installed

Moving from Docker Desktop for Windows to Docker Server / CLI for Linux to escape the license fee, I used the standard documentation for Ubuntu to install docker into my WSL2. After frankensteining it ...
Chris's user avatar
  • 151
3 votes
1 answer
954 views

How to resolve the dependencies while installing locally downloaded packages?

I have simple playbook where trying to install the Debian packages downloaded locally in my server. This playbook runs on localhost and install the Debian packages in the same system. But this ...
john 517501's user avatar
3 votes
2 answers
183 views

Deploy two independently hosted services in production at once without any downtime

I have two different services. Let's say Service A and Service B. Service B is dependent on Service A. Both code bases are hosted in separate repo in Bitbucket and code bases are maintained by ...
Cyberzinga's user avatar
3 votes
2 answers
4k views

Ultimate docker permission solution

I'm using docker some time and I like the conception very much. But I found a thing is a big problem for me. I'm talking about permissions. While I'm not worrying about production, setting up my ...
Pawel's user avatar
  • 31
3 votes
1 answer
68 views

Is it possible to securely delete a file from a virtual disk in a cloud provider?

Considering that virtual hard drives are generally formatted using something like ext3 that abstracts away from the underlying block device, which in and of itself is an abstraction over the top of a ...
Richard Slater's user avatar
3 votes
1 answer
245 views

Is running linux container on windows aws instance possible?

what I'm trying to achieve is running a Linux(ubuntu LST) container inside a windows server 2019 OS. The problem is that the windows OS runs as an AWS instance. There have been problem for me trying ...
dor00012's user avatar
  • 131
3 votes
0 answers
1k views

Remote connection from Docker container by FTP

I built my docker image and run it: docker run --rm -P -d test:latest Then I entered the command and opened connection: ftp open XXX I successfully connected and entered user data. After that I ...
Leonid's user avatar
  • 91
2 votes
2 answers
203 views

reboot server during Ansible tasks

I have 3 scripts that must be run on server one by one. for example: - name: find config shell: /data/scripts/config1 become: yes become_user: root tags: find_config - name: change config ...
BlackCrystal's user avatar
2 votes
1 answer
1k views

docker swarm init made docker go corrupted

I started learning docker recently and I set up a virtual machine (VirtualBox) with Lubuntu image: Linux verion: Linux 4.18.0-10-generic i686 Docker version: 18.06.1-ce, API-version: 1.38, Go version:...
Alexey R.'s user avatar
  • 121
2 votes
1 answer
524 views

Ansible - Variable expansion inside hostvars declaration?

I have a hardcoded hostvars line, like so: node1_hostname={{ hostvars['192.168.0.162']['node1_hostname'] }} I have a set_fact variable from a previous play that I'd like to expand in the host section ...
synth45's user avatar
  • 71
2 votes
1 answer
2k views

Ansible tmp files created with odd permissions

I have an ansible playbook which can be simplified to this: - name: Provision server hosts: all_hosts become: yes ...
fildred13's user avatar
  • 313
2 votes
1 answer
149 views

How to pin public root key when downloading an image with docker pull (Docker Content Trust)?

How can I execute docker pull (with Docker Content Trust enabled) such that it fails if the image doesn't have a valid signature using the private key corresponding to (or subordinate to) the public ...
Michael Altfield's user avatar
2 votes
1 answer
645 views

How do I convert "\n" to linebreaks in my docker logs?

I am using docker-compose up to start a web server in linux but am finding that the stdout is printing "\n" characters instead of creating new lines. This makes stack traces difficult to ...
quant's user avatar
  • 155
2 votes
1 answer
10k views

how to prevent Ansible from showing output on screen?

I have this in my playbook which execute a command on remote server and enters its log on local server. - name: run script shell: runuser -l testuser -c "/tmp/test.sh" register: myshell_output ...
BlackCrystal's user avatar
2 votes
1 answer
511 views

Azure Security Center with Ubuntu 19

Has anyone successfully gotten the Azure Security Center agent to work with Ubuntu 19? My omsconfig.log is full of messages like This event indicates that failure happens when LCM is trying to get ...
Gaius's user avatar
  • 1,076
2 votes
2 answers
2k views

Getting data from crashed docker container

I am having docker container with Ubuntu installed which was running with Nvidia docker But now I connected that HDD in a different computer. Now After typing following command in newly assembled ...
Mangesh Divate's user avatar
2 votes
2 answers
1k views

Docker won't create a bridge network without being given an explicit subnet

The problem The problem is that this happens: $ docker network create alpine4 Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign ...
Marcin's user avatar
  • 121
2 votes
2 answers
2k views

Join a Linux Docker swarm with a local Windows Docker for test purposes

I'm currenlty trying to connect/join a Linux Docker Swarm cluster with my Windows machine in order to test a stack without sending the stack over and over to my test cluster under Linux. My problem is ...
Paul Rey's user avatar
  • 233
2 votes
1 answer
4k views

Permission errors with non-root USER when running on Linux

I have been getting some unexpected failures with the execution of my Docker images when running on my Ubuntu 16.04.3 LTS machine. I'm using Docker version 18.02.0-ce (edge), installed from apt. I've ...
Jake Feasel's user avatar
2 votes
2 answers
85 views

Automatic production deployment for a Node.js app on RHEL 7?

I am looking for some way to have a maximally simple(no Jenkins or anything like that) automatic production deployment for a Node.js application on a RHEL 7 system. The caveat is: At the organization ...
Megakoresh's user avatar