Skip to content

Commit

Permalink
removed ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
artlov committed Dec 14, 2022
1 parent e0d6e68 commit 2d64e94
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 70 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ RUN apt-get -y update && \
libfontconfig \
mc \
net-tools \
openssh-server \
supervisor \
gnupg \
gnupg2 \
Expand All @@ -44,19 +43,15 @@ RUN apt-get -y update && \
curl -sL https://deb.nodesource.com/setup_15.x | bash - && \
apt-get install -y nodejs

# Configure Supervisord, SSH and base env
# Configure Supervisord and base env
COPY supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

WORKDIR /root

RUN mkdir -p /var/log/supervisor && \
mkdir -p /var/run/sshd && \
echo 'root:root' | chpasswd && \
rm -rf .ssh && \
rm -rf .profile && \
mkdir .ssh
rm -rf .profile

COPY ssh/id_rsa .ssh/id_rsa
COPY bash/profile .profile

# Install InfluxDB
Expand All @@ -72,7 +67,7 @@ RUN wget https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION
dpkg -i telegraf_${TELEGRAF_VERSION}_amd64.deb && rm telegraf_${TELEGRAF_VERSION}_amd64.deb

# Configure Telegraf
RUN mv -f /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.default
RUN mv -f /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.default
COPY telegraf/telegraf.conf /etc/telegraf/telegraf.conf
COPY telegraf/init.sh /etc/init.d/telegraf

Expand All @@ -99,7 +94,7 @@ RUN chmod 755 /usr/share/snmp/mibs
#COPY rootfs /tmp
#RUN /tmp/grafana-plugins.sh

EXPOSE 22/tcp 3003/tcp 8086/tcp 8888/tcp 8125/udp
EXPOSE 3003/tcp 8086/tcp 8888/tcp 8125/udp
#VOLUME /var/lib/influxdb /var/lib/grafana /var/lib/backups

# Cleanup
Expand Down
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ docker run --ulimit nofile=66000:66000 -d \
-p 3003:3003 \
-p 3004:8888 \
-p 8086:8086 \
-p 22022:22 \
-p 8125:8125/udp \
-v /path/for/influxdb:/var/lib/influxdb \
-v /path/for/grafana:/var/lib/grafana \
Expand Down Expand Up @@ -58,14 +57,7 @@ Host Container Service
3004 8888 influxdb-admin (chronograf)
8086 8086 influxdb HTTP API port
8125 8125 telegraf
22022 22 sshd
```
## SSH

```sh
ssh root@localhost -p 22022
```
By default root password login disabled. If ssh connection needed, please configure key authentication.

Access from docker host:
```
Expand Down Expand Up @@ -116,5 +108,5 @@ Port: 8086

### InfluxDB Shell (CLI)

1. Establish a ssh or docker exec connection with the container
1. Establish a docker exec connection with the container
2. Launch `influx` to open InfluxDB Shell (CLI)
51 changes: 0 additions & 51 deletions ssh/id_rsa

This file was deleted.

1 change: 0 additions & 1 deletion ssh/id_rsa.pub

This file was deleted.

0 comments on commit 2d64e94

Please sign in to comment.