Minor tweaks
parent
38966e4a63
commit
414b05fb22
|
@ -8,9 +8,9 @@ RUN apt-get update --yes && \
|
|||
apt-get upgrade --yes && \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
bash \
|
||||
#tini \
|
||||
locales \
|
||||
iptables \
|
||||
dnsutils \
|
||||
&& \
|
||||
# Clean up and generate locales
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||
|
@ -27,7 +27,6 @@ EXPOSE 587
|
|||
COPY start.sh /start.sh
|
||||
COPY iptables.sh /iptables.sh
|
||||
|
||||
#ENTRYPOINT ["tini", "-g", "--"]
|
||||
ENTRYPOINT ["bash"]
|
||||
CMD ["start.sh"]
|
||||
CMD ["/start.sh"]
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
nat () {
|
||||
# All traffic to $THIS_PORT on this container
|
||||
# will be redirected to $THAT_PORT on $THAT_IP
|
||||
$THAT_IP=$1
|
||||
THAT_IP=$1
|
||||
THIS_PORT=$2
|
||||
THAT_PORT=$3
|
||||
|
||||
# Accept forward incoming traffic
|
||||
iptables -I FORWARD -d $FWD_IP -m tcp -p tcp --dport $THAT_PORT -j ACCEPT
|
||||
iptables -I FORWARD -d $THAT_IP -m tcp -p tcp --dport $THAT_PORT -j ACCEPT
|
||||
|
||||
# Accept forward return traffic
|
||||
iptables -I FORWARD -s $FWD_IP -m tcp -p tcp --sport $THAT_PORT -j ACCEPT
|
||||
iptables -I FORWARD -s $THAT_IP -m tcp -p tcp --sport $THAT_PORT -j ACCEPT
|
||||
|
||||
# Redirect packets to remote
|
||||
iptables -t nat -I PREROUTING -m tcp -p tcp --dport $THIS_PORT -j DNAT --to-destination $THAT_IP:$THAT_PORT
|
||||
}
|
||||
|
||||
NAT_IP=10.143.0.20
|
||||
NAT_IP=$(dig +short betalupi.com)
|
||||
nat $NAT_IP 33 10013
|
||||
nat $NAT_IP 993 10015
|
||||
nat $NAT_IP 587 10016
|
||||
|
@ -25,4 +25,4 @@ nat $NAT_IP 587 10016
|
|||
|
||||
|
||||
# Include this line ONCE, at the end.
|
||||
iptables -t nat -I POSTROUTING -d $FWD_IP -j MASQUERADE
|
||||
iptables -t nat -I POSTROUTING -d $NAT_IP -j MASQUERADE
|
|
@ -53,9 +53,9 @@ printf "Done. \n\n"
|
|||
|
||||
|
||||
|
||||
build_image octave
|
||||
build_image r
|
||||
build_image julia
|
||||
#build_image octave
|
||||
#build_image r
|
||||
#build_image julia
|
||||
#build_image sage (BROKEN)
|
||||
|
||||
build_image plugins
|
||||
|
@ -68,7 +68,7 @@ build_image pymodules
|
|||
|
||||
|
||||
# Rename final image
|
||||
docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter
|
||||
docker image tag betalupi/jupyter-inter-(math $img_idx) git.betalupi.com/mark/jupyter_small
|
||||
docker image rm betalupi/jupyter-inter-(math $img_idx)
|
||||
|
||||
echo ""
|
||||
|
|
Loading…
Reference in New Issue