mirror of
https://github.com/LIV2/ise-docker.git
synced 2025-12-05 22:42:44 +00:00
Kill webeserver, even if slower stick with easy stuff. Make setup script independent by screen size. Install webpack
This commit is contained in:
parent
52cbda3d2d
commit
50aee51593
@ -1 +0,0 @@
|
||||
xilinx-installer
|
||||
37
Dockerfile
37
Dockerfile
@ -2,24 +2,39 @@ FROM ubuntu:14.04
|
||||
|
||||
# basic packages
|
||||
RUN apt-get update && \
|
||||
apt-get -y install git expect emacs24-nox locales \
|
||||
apt-get -y install git expect locales \
|
||||
libglib2.0-0 libsm6 libxi6 libxrender1 libxrandr2 \
|
||||
libfreetype6 libfontconfig1 wget
|
||||
libfreetype6 libfontconfig1
|
||||
|
||||
# some essential tools..
|
||||
RUN apt-get update && \
|
||||
apt-get -y install nano usbutils
|
||||
|
||||
# Set LOCALE to UTF8
|
||||
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen en_US.UTF-8 && \
|
||||
/usr/sbin/update-locale LANG=en_US.UTF-8
|
||||
|
||||
|
||||
RUN mkdir -p /tmp/install
|
||||
# adding xilinx installer
|
||||
COPY xilinx-installer/Xilinx_ISE_DS_14.7_1015_1-1.tar /tmp
|
||||
COPY xilinx-installer/Xilinx_ISE_DS_14.7_1015_1-3.zip.xz /tmp
|
||||
COPY xilinx-installer/Xilinx_ISE_DS_14.7_1015_1-2.zip.xz /tmp
|
||||
COPY xilinx-installer/Xilinx_ISE_DS_14.7_1015_1-4.zip.xz /tmp
|
||||
|
||||
# adding scripts
|
||||
ADD files /
|
||||
|
||||
RUN cd /root/install && \
|
||||
wget "http://127.0.0.1:8765/Xilinx_ISE_DS_14.7_1015_1-1.tar" && \
|
||||
wget "http://127.0.0.1:8765/Xilinx_ISE_DS_14.7_1015_1-2.zip.xz" && \
|
||||
wget "http://127.0.0.1:8765/Xilinx_ISE_DS_14.7_1015_1-3.zip.xz" && \
|
||||
wget "http://127.0.0.1:8765/Xilinx_ISE_DS_14.7_1015_1-4.zip.xz" && \
|
||||
tar xvf Xilinx_ISE_DS_14.7_1015_1-1.tar && \
|
||||
TERM=xterm /root/setup && \
|
||||
cd && \
|
||||
rm -rf /root/setup /root/install
|
||||
RUN cd /tmp/install && \
|
||||
tar xvf ../Xilinx_ISE_DS_14.7_1015_1-1.tar
|
||||
|
||||
RUN cd /tmp/install && TERM=xterm /tmp/setup && \
|
||||
cd
|
||||
|
||||
RUN adduser --disabled-password --gecos '' ise
|
||||
USER ise
|
||||
WORKDIR /home/ise
|
||||
|
||||
#source ise settings
|
||||
RUN echo "source /opt/Xilinx/14.7/ISE_DS/settings64.sh" >> /home/ise/.bashrc
|
||||
|
||||
25
build
25
build
@ -1,26 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
DOCKER_TARGET=${DOCKER_TARGET:-docker.i74.de:5000}
|
||||
IMAGE_NAME=xilinx-ise
|
||||
IMAGE_TAG=14.7
|
||||
|
||||
# start small webserver to hold install files
|
||||
cd xilinx-installer
|
||||
python3 -m http.server 8765 --bind 127.0.0.1 >/dev/null 2>&1 &
|
||||
HTTP_SERVER_PID=$!
|
||||
trap "echo 'stopping $HTTP_SERVER_PID' ; if [ $HTTP_SERVER_PID ] ; then kill $HTTP_SERVER_PID ; fi" SIGINT SIGTERM EXIT
|
||||
cd ..
|
||||
|
||||
docker build --network host --rm -t ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG} .
|
||||
docker tag ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG} ${DOCKER_TARGET}/${IMAGE_NAME}:latest
|
||||
|
||||
read -n1 -p "Do you want to push the image to the registry now [yN]? " answer
|
||||
if [[ "${answer:-n}" == "y" ]]
|
||||
then
|
||||
docker push ${DOCKER_TARGET}/${IMAGE_NAME}:${IMAGE_TAG}
|
||||
docker push ${DOCKER_TARGET}/${IMAGE_NAME}:latest
|
||||
fi
|
||||
docker build -t ise-14-7 .
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout -1
|
||||
|
||||
spawn /root/install/bin/lin64/batchxsetup -batch config
|
||||
|
||||
set count 23; set done 0; set todo $count;
|
||||
while {$count > 0 } {
|
||||
set done [expr $done+1];
|
||||
expect "Press Enter key to continue" { send "\r" }
|
||||
puts "\n\ndone : $done/$todo\n\n";
|
||||
set count [expr $count-1];
|
||||
}
|
||||
|
||||
expect "I accept and agree to the terms and conditions above." { send "y\r" }
|
||||
|
||||
set count 2566; set done 0; set todo $count;
|
||||
while {$count > 0 } {
|
||||
set done [expr $done+1];
|
||||
expect "Press Enter key to continue" { send "\r" }
|
||||
puts "\n\ndone : $done/$todo\n\n";
|
||||
set count [expr $count-1];
|
||||
}
|
||||
|
||||
expect "I accept and agree to the terms and conditions above." { send "y\r" }
|
||||
expect eof
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
destination_dir=/opt/Xilinx
|
||||
|
||||
downloadlocation_dir=/root/install
|
||||
downloadlocation_dir=/tmp/
|
||||
|
||||
# &Import tool preferences from previous version
|
||||
copy_preferences=N
|
||||
@ -21,11 +21,11 @@ application=Acquire or Manage a License Key::0
|
||||
# comment all other blocks to install ISE WebPACK
|
||||
################################################################
|
||||
|
||||
# package=ISE WebPACK::0
|
||||
# application=setupEnv.sh::0
|
||||
# application=Install Linux System Generator Info XML::0
|
||||
# application=Ensure Linux System Generator Symlinks::0
|
||||
# application=Install Cable Drivers::0
|
||||
package=ISE WebPACK::1
|
||||
application=setupEnv.sh::0
|
||||
application=Install Linux System Generator Info XML::0
|
||||
application=Ensure Linux System Generator Symlinks::0
|
||||
application=Install Cable Drivers::0
|
||||
|
||||
|
||||
################################################################
|
||||
@ -76,14 +76,14 @@ application=Acquire or Manage a License Key::0
|
||||
# comment all other blocks to install ISE Design Suite System Edition
|
||||
################################################################
|
||||
|
||||
package=ISE Design Suite System Edition::1
|
||||
application=setupEnv.sh::0
|
||||
application=Ensure Linux System Generator Symlinks::0
|
||||
application=Install Linux System Generator Info XML::0
|
||||
application=Configure WebTalk::0
|
||||
application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
|
||||
application=Install Cable Drivers::0
|
||||
application=Version Equalizer::0
|
||||
#package=ISE Design Suite System Edition::1
|
||||
#application=setupEnv.sh::0
|
||||
#application=Ensure Linux System Generator Symlinks::0
|
||||
#application=Install Linux System Generator Info XML::0
|
||||
#application=Configure WebTalk::0
|
||||
#application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
|
||||
#application=Install Cable Drivers::0
|
||||
#application=Version Equalizer::0
|
||||
|
||||
|
||||
################################################################
|
||||
@ -95,4 +95,3 @@ application=Version Equalizer::0
|
||||
# application=Configure WebTalk::0
|
||||
# application=Enable WebTalk to send software, IP and device usage statistics to Xilinx (Always enabled for WebPACK license)::0
|
||||
# application=Install Cable Drivers::0
|
||||
|
||||
22
files/tmp/setup
Executable file
22
files/tmp/setup
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 2
|
||||
|
||||
spawn /tmp/install/bin/lin64/batchxsetup -batch config
|
||||
|
||||
set GO 1
|
||||
while {$GO > 0} {
|
||||
expect "Press Enter key to continue" { send "\r" } timeout { set GO 0 }
|
||||
}
|
||||
|
||||
expect "I accept and agree to the terms and conditions above." { send "y\r" }
|
||||
|
||||
set GO 1
|
||||
while {$GO > 0} {
|
||||
expect "Press Enter key to continue" { send "\r" } timeout { set GO 0 }
|
||||
}
|
||||
|
||||
expect "I accept and agree to the terms and conditions above." { send "y\r" }
|
||||
|
||||
set timeout -1
|
||||
expect eof
|
||||
27
run-docker-ssh
Executable file
27
run-docker-ssh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
#https://blog.yadutaf.fr/2017/09/10/running-a-graphical-app-in-a-docker-container-on-a-remote-server/
|
||||
|
||||
# Prepare target env
|
||||
CONTAINER_HOME="ise"
|
||||
HOST_DOCKER_IP=172.17.0.1
|
||||
|
||||
# Create a directory for the socket
|
||||
#mkdir -p display/socket
|
||||
|
||||
echo "" > Xauthority
|
||||
|
||||
# Get the DISPLAY slot
|
||||
DISPLAY_NUMBER=$(echo $DISPLAY | cut -d. -f1 | cut -d: -f2)
|
||||
|
||||
# Extract current authentication cookie
|
||||
AUTH_COOKIE=$(xauth list ${DISPLAY} | awk '{print $3}')
|
||||
|
||||
# Create the new X Authority file
|
||||
xauth -f Xauthority add ${HOST_DOCKER_IP}:${DISPLAY_NUMBER} MIT-MAGIC-COOKIE-1 ${AUTH_COOKIE}
|
||||
|
||||
# Launch the container
|
||||
docker run -it --rm \
|
||||
-e DISPLAY=${HOST_DOCKER_IP}:${DISPLAY_NUMBER} \
|
||||
-v ${PWD}/Xauthority:/home/${CONTAINER_HOME}/.Xauthority \
|
||||
-v /home/andrea/PROGETTI/FPGA:/home/${CONTAINER_HOME}/work \
|
||||
ise-14-7 /bin/bash
|
||||
Loading…
x
Reference in New Issue
Block a user