Community discussions

MikroTik App
 
okazdal
Trainer
Trainer
Topic Author
Posts: 25
Joined: Fri Aug 07, 2015 4:44 pm

Container: Ubuntu server on your CHR

Sun Sep 18, 2022 10:41 am

Hello,
I created a simple ubuntu server image with just ssh server running on it. It is for CHR.

URL for image repo https://hub.docker.com/r/okazdal/ubuntu-ssh-server
After properly enabling container and setting up veth interfaces and disks, you can use it like this:
/container config
set registry-url=https://registry-1.docker.io tmpdir=disk1/tmp
/container add remote-image=okazdal/ubuntu-ssh-server interface=veth1
Default user/pass is sekuritim/tester

Initial dockerfile I used to create it is below, so you can use it to install packages and other software and create your own images:
FROM ubuntu:latest

RUN apt update && apt install  openssh-server sudo -y

RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 sekuritim 

RUN  echo 'sekuritim:tester' | chpasswd

RUN service ssh start

EXPOSE 22

CMD ["/usr/sbin/sshd","-D"]
Screenshot_2022-09-18_10-44-06.png
Cheers,
okazdal
You do not have the required permissions to view the files attached to this post.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2879
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Container: Ubuntu server on your CHR

Sun Sep 18, 2022 11:37 am

Thank you for sharing your setup.
 
fragtion
Member Candidate
Member Candidate
Posts: 259
Joined: Fri Nov 13, 2009 10:08 pm
Location: Johannesburg, South Africa

Re: Container: Ubuntu server on your CHR

Mon Sep 19, 2022 4:32 am

Thanks for this I've been wanting to set up the same, you saved us some time 🙂
 
Fmarte
just joined
Posts: 8
Joined: Sun Sep 27, 2020 11:51 pm

Re: Container: Ubuntu server on your CHR

Sat Jan 07, 2023 7:01 am

Hello, Thanks very útil.

I am trying to install some tools and I am getting the following error: any ideas

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

Help

Who is online

Users browsing this forum: Bing [Bot], youngster2002 and 111 guests