Sign inSign up

capiloky/full-ihost

By capiloky

•Updated over 3 years ago

Full deploy ssh/docker/node/

Image
0

1.3K

capiloky/full-ihost repository overview

SSH container for Sonoff iHost

This is a Dockerfile to create a container with SSH server for Sonoff iHost.

⁠Usage

  1. Go to http://ihost.local/#/docker⁠
  2. Add-on from Docker hub -> capiloky/sonoff-ssh
  3. Configure the container
  4. Start the container
  5. Connect to the container using SSH: (user: sshuser, password: password)

⁠Dockerfile

FROM arm32v7/ubuntu:latest

# Install and configure SSH server
RUN apt-get update && \
    apt-get install -y openssh-server sudo
RUN useradd -m -d /home/ihost -s /bin/bash ihost && \
    echo 'ihost:changeme' | chpasswd
RUN echo 'ihost ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
RUN mkdir /run/sshd
COPY sshd_config /etc/ssh/sshd_config

# Install and configure Docker

VOLUME ["/var/run/docker.sock:/var/run/docker.sock"]

RUN apt-get update && \
    apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt-get update && \
    apt-get install -y docker-ce docker-ce-cli containerd.io
RUN usermod -aG docker ihost
RUN mkdir /home/ihost/.docker

# Install and configure Docker Compose (docker-compose) without python
RUN curl -L "https://github.com/docker/compose/releases/download/2.17.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
RUN chmod +x /usr/local/bin/docker-compose


# Install and configure Git
RUN apt-get update && \
    apt-get install -y git

# Install and configure Node.js
RUN apt-get update && \
    apt-get install -y nodejs npm
RUN npm install -g n
RUN n stable

# Install and configure Yarn
RUN apt-get update && \
    apt-get install -y curl
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && \
    apt-get install -y yarn

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

Tag summary

Content type

Image

Digest

sha256:4e1121c1c…

Size

465.3 MB

Last updated

over 3 years ago

docker pull capiloky/full-ihost