Commit 9550d829 authored by nimrod's avatar nimrod
Browse files

Use host network.

Now I should be able to access services from different containers.
parent 7a56a961
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -148,6 +148,6 @@ RUN wget https://www.mongodb.org/static/pgp/server-4.4.asc -O /tmp/mongo.asc &&
    rm /etc/ssh/ssh_host_* && \
    rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
VOLUME /run/sshd
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
HEALTHCHECK CMD nc -vzw3 localhost 22 || exit 1
EXPOSE 2222
CMD ["/usr/sbin/sshd", "-D", "-o", "Port=2222"]
HEALTHCHECK CMD nc -vzw3 localhost 2222 || exit 1
+1 −6
Original line number Diff line number Diff line
@@ -7,8 +7,7 @@ services:
      context: .
    hostname: workbench.shore.co.il
    #image: adarnimrod/workbench
    ports:
      - "2222:22"
    network_mode: host
    restart: always
    tmpfs:
      - /tmp:exec
@@ -27,7 +26,3 @@ services:
      - /run/dbus:/run/dbus
      - /run/docker.sock:/run/docker.sock
      - /var/lib/flatpak:/var/lib/flatpak

networks:
  default:
    name: shore