Docker Remote Development Server - linux

I wonder if I could set up a remote development server using Docker. Until now I was using VSCode with the Remote SSH extension to connect to my server(Debian) and work on my projects. But now I would like to set up an environment, where I can have more developers connected at the same time, each working on their own projects. From my understanding Docker creates something like a lightweight VM(container). So I guess it would be perfect if all of them could have their own Docker container with their own terminal and files.
So my questions are:
-Is it possible to set up something like that?
-How should I set up the whole thing?
-Does Docker have any kind of authentication so the developers could connect remotely to the server with an username and password or something like that?
-If not, can I do the same SSH thing like before, but separate the users into these containers? So the users will SSH into the container not the VM?
I'm really new into Docker so I would appreciate all you help and suggestions. Thank you.

Related

Docker Command Restrictions on Ubuntu

I am currently prototyping Docker hosted on WSL and Ubuntu that will be located on a compliant workstation. Being an early prototype, we want it setup heavily restricted to side step compliancy.
Now a piece of the puzzle is being able to restrict users to only a few commands that will allow them to accomplish their job. For example, can I use Unix permissions to restrict Docker commands such as: docker network create and flags such as --privileged, --mount, etc? The goal here is to deploy a specific configuration and ensure that it cannot be changed by non-admin users. Thank you.

How to properly run eclipse hawkBit

I am new to the tech world, I want to get to know eclipse hawkBit, I am a total noob and beginner so any help is mucha appreciated.
My scenario:
I have a Windows 10 OS with VMware workstation on it, I have installed Ubuntu on it to run eclipse hawkBit and docker ofcourse.
My internet connection is a highspeed mobile internet connection, I use my smarphone to tether(Mobile hotspot).
What I want to do:
I want to start eclipse hawkBit so basically run it simulate some devices and get to know how to use hawkBit.
My problem: so to run hawkBit according to the official documentation i just need to give this on the terminal: docker run -p 8080:8080 hawkbit/hawkbit-update-server:latest
I have seen a youtube video where if hawkBit works it will show me the localhost port info and say successfully connected(or something similar to that)
but the error or problem i keep encountering is this: 2021-06-17 11:35:19.312 INFO 1 --- [tContainer#1-56] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
Here is a picture of it:
I would really appreciate if you guys could help me with this, there is not much support or videos of this problem, infact its hard to find decent reference material for hawkBit.
any help is much appreciated.
The exception you see here is due to a missing (or misconfigured) RabbitMQ service.
You will need to configure the environment variable SPRING_RABBITMQ_HOST to point to the running RabbitMQ instance.
docker run -p 8080:8080 -e SPRING_RABBITMQ_HOST=ip-of-rabbitmq-service hawkbit/hawkbit-update-server:latest
For an easier setup, you could use the docker compose file for hawkbit (Option B or C), which already has a preconfigured RabbitMQ as well as MySQL container.

Keep OrientDB server running on AWS EC2

I recently downloaded and managed to start an OrientDB server/database on an AWS EC2 Linux 14.04 (I think the name is) server for an application I want to set up. I started OrientDB "as usual" by running ./server.sh in the terminal via SSH link to the EC2 server. All works fine and I can query the database while at the computer. But as soon as I leave my computer and the SSH link is broken (for example when closing the computer), so is the database, i.e. it stops.
Is there a way to go around this or do I have to set up the database in some other way?
OrientDB is provided as AWS AMI. Take a look to
http://orientdb.com/orientdb-amazon-web-services/
If you want to DIY, follow the instructions provided on
http://orientdb.com/docs/last/Unix-Service.html
Update: new link to doc:
https://orientdb.com/docs/last/admin/Unix-Service.html
Hope this helps
you can try putting full path to server.sh into /etc/rc.local before exit 0 and reboot the instance
Before running the server, run the command:
screen
This will create a persistent environment which will allow your process to keep running after you disconnect.
When you reconnect, you can use this command to reconnect to that environment:
screen -r

How to connect to the random temporary servers with ssh without password prompt

I would like to generate few VMs by script and then depending on some variables I would like to connect to them and make changes there (download/untar/run something). Everything automatically from another script.
The VMs are reachable via IP, but the question is how to connect to them with ssh without any password request. The security is not an issue.
The best fro me would be if ssh could take the password from some file.
Most of answers I found was using sshpass or expect but as I want to be sure that those scripts can be performed from everywhere I don't want to use "non-standard" application.
Any idea?
Thank you!
Create a public key that will be common to these temp vms.
Once the vm is alive, copy the common key to it using ssh-copy-id.
There are tutorials online I'm sure.

Best Practice? Restart Centos service via ssh securely?

I have a need to restart a CentOS service remotely via ssh during an automated, unattended process (executing a build on some software from a build server), but am unsure how to best implement security. Help is needed! ;-)
Environment:
Running an ssh login on a remote box, I want to execute on my server something like:
/sbin/service jetty restart.
The ssh call is being made during a maven build process (probably doesn't affect anything, really).
I want the ssh session to login with a user that has practically zero permissions on the server except to execute the above.
I can set up shared key access for the ssh session.
Thanks!
Good idea to use an ssh key. You can then use a 'forced command' for that particular key, so it won't be able to run any other commands. See http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto.html

Resources