Remove even more old terminal related stuff.

This commit is contained in:
Pagan Gazzard 2016-04-18 18:13:23 +01:00
parent d0318c47d6
commit f910ec11a8
10 changed files with 5 additions and 71 deletions

View File

@ -8,7 +8,6 @@ RUN apt-get -q update \
btrfs-tools \
ca-certificates \
rsync \
socat \
supervisor \
--no-install-recommends \
&& apt-get clean \
@ -34,8 +33,7 @@ RUN apt-get -q update \
# Copy source
COPY . /app/
RUN chmod +x /app/src/enterContainer.sh \
&& /app/node_modules/.bin/coffee -c /app/src \
RUN /app/node_modules/.bin/coffee -c /app/src \
&& ln -sf /app/entry.sh /start # Needed for legacy
RUN chmod +x /app/bin/gosuper

View File

@ -8,7 +8,6 @@ RUN apt-get -q update \
btrfs-tools \
ca-certificates \
rsync \
socat \
supervisor \
--no-install-recommends \
&& apt-get clean \
@ -34,8 +33,7 @@ RUN apt-get -q update \
# Copy source
COPY . /app/
RUN chmod +x /app/src/enterContainer.sh \
&& /app/node_modules/.bin/coffee -c /app/src \
RUN /app/node_modules/.bin/coffee -c /app/src \
&& ln -sf /app/entry.sh /start # Needed for legacy
RUN chmod +x /app/bin/gosuper

View File

@ -8,7 +8,6 @@ RUN apt-get -q update \
btrfs-tools \
ca-certificates \
rsync \
socat \
supervisor \
--no-install-recommends \
&& apt-get clean \
@ -34,8 +33,7 @@ RUN apt-get -q update \
# Copy source
COPY . /app/
RUN chmod +x /app/src/enterContainer.sh \
&& /app/node_modules/.bin/coffee -c /app/src \
RUN /app/node_modules/.bin/coffee -c /app/src \
&& ln -sf /app/entry.sh /start # Needed for legacy
RUN chmod +x /app/bin/gosuper

View File

@ -8,7 +8,6 @@ RUN apt-get -q update \
btrfs-tools \
ca-certificates \
rsync \
socat \
supervisor \
--no-install-recommends \
&& apt-get clean \
@ -34,8 +33,7 @@ RUN apt-get -q update \
# Copy source
COPY . /app/
RUN chmod +x /app/src/enterContainer.sh \
&& /app/node_modules/.bin/coffee -c /app/src \
RUN /app/node_modules/.bin/coffee -c /app/src \
&& ln -sf /app/entry.sh /start # Needed for legacy
RUN chmod +x /app/bin/gosuper

View File

@ -8,7 +8,6 @@ RUN apt-get -q update \
btrfs-tools \
ca-certificates \
rsync \
socat \
supervisor \
--no-install-recommends \
&& apt-get clean \
@ -34,8 +33,7 @@ RUN apt-get -q update \
# Copy source
COPY . /app/
RUN chmod +x /app/src/enterContainer.sh \
&& /app/node_modules/.bin/coffee -c /app/src \
RUN /app/node_modules/.bin/coffee -c /app/src \
&& ln -sf /app/entry.sh /start # Needed for legacy
RUN chmod +x /app/bin/gosuper

View File

@ -1,14 +0,0 @@
#!/bin/bash
if [ -f /usr/bin/rce ]; then
ENGINE=rce
else
ENGINE=docker
fi
CONTAINER_PID=$($ENGINE inspect --format '{{if .State.Running}}{{.State.Pid}}{{end}}' $1)
if [ -z $CONTAINER_PID ]; then
read -p "Application must be running for a terminal to be started."
else
nsenter --target $CONTAINER_PID --mount --uts --ipc --net --pid -- bash -c 'while IFS= read -r -d "" var; do export "$var"; done < /proc/1/environ; exec bash'
fi

View File

@ -9,12 +9,6 @@ set -e
cd /app
DATA_DIRECTORY=/data
if [ -d "$DATA_DIRECTORY" ]; then
cp bin/enter.sh $DATA_DIRECTORY/enter.sh
chmod +x $DATA_DIRECTORY/enter.sh
fi
mkdir -p /var/log/supervisor && touch /var/log/supervisor/supervisord.log
mkdir -p /var/run/resin
mount -t tmpfs -o size=1m tmpfs /var/run/resin

View File

@ -1,17 +0,0 @@
#!/bin/bash
SOCKET_NAME=test-${1}-${2}-${3}
HOST_DATA_PATH=/resin-data/resin-supervisor
HOST_SOCKET=${HOST_DATA_PATH}/${SOCKET_NAME}
SUPERVISOR_SOCKET_PATH=/data
COMMAND_SOCKET=${SUPERVISOR_SOCKET_PATH}/host
if [ ! -S ${COMMAND_SOCKET} ]; then
read -p 'TTY mode not supported on this image, please update.'
else
echo "
rm -f ${HOST_SOCKET}
socat UNIX-LISTEN:${HOST_SOCKET} EXEC:'${HOST_DATA_PATH}/enter.sh ${1}',pty,setsid,setpgid,stderr,ctty &
exit
" | socat UNIX:${COMMAND_SOCKET} - >& /dev/null
socat UNIX:${SUPERVISOR_SOCKET_PATH}/${SOCKET_NAME} -,raw,echo=0
fi

View File

@ -36,7 +36,6 @@ RUN apt-get update \
python-dev \
rsyslog \
rsyslog-gnutls \
socat \
vim \
wget \
&& rm -rf /var/lib/apt/lists/*
@ -83,6 +82,5 @@ COPY config/services/ /etc/systemd/system/
COPY resin-vars vpn-init /usr/src/app/
RUN systemctl enable resin-supervisor-dind
RUN systemctl enable resin-supervisor-host-socket
CMD env > /etc/docker.env; exec /sbin/init

View File

@ -1,17 +0,0 @@
[Unit]
Description=Host socket for resin supervisor
Requires=resin-supervisor.service
After=resin-supervisor.service
[Service]
Restart=always
ExecStartPre=-/bin/rm -f /resin-data/resin-supervisor/host
ExecStart=/bin/bash -c ' \
while true; do \
rm -f /resin-data/resin-supervisor/host; \
socat UNIX-LISTEN:/resin-data/resin-supervisor/host EXEC:/bin/bash,pty,setsid,setpgid,stderr,ctty; \
done'
ExecStopPost=-/bin/rm -f /resin-data/resin-supervisor/host
[Install]
WantedBy=multi-user.target