Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chibiegg committed May 7, 2017
0 parents commit bfb5d83
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
work/
files/*.bin
15 changes: 15 additions & 0 deletions Dockerfile-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM vivado:installed

RUN rm -rf /tmp/.X*

RUN useradd -ms /bin/bash vivado
USER vivado
WORKDIR /home/vivado

RUN mkdir -p /home/vivado/.vnc
ADD files/xstartup /home/vivado/.vnc/xstartup
ADD files/entrypoint.sh /opt/entrypoint.sh

ENV GEOMETRY 1024x768

CMD ["/opt/entrypoint.sh"]
14 changes: 14 additions & 0 deletions Dockerfile-initial
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get -y upgrade && apt-get install -y libxrender-dev libxtst-dev vnc4server twm

RUN mkdir -p /opt
ADD files/Xilinx_Vivado_SDK_2016.1_0409_1_Lin64.bin /opt/Xilinx_Vivado_SDK_2016.1_0409_1_Lin64.bin
RUN chmod +x /opt/Xilinx_Vivado_SDK_2016.1_0409_1_Lin64.bin
ADD files/install.sh /opt/install.sh

ENV DISPLAY :0

EXPOSE 5900

CMD ["/opt/install.sh"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Build

Place installer at `files/Xilinx_Vivado_SDK_2016.1_0409_1_Lin64.bin`.

```
docker build -t vivado:initial -f Dockerfile-initial .
docker run -ti -p 5900:5900 --name vivado_install vivado:initial # Install with GUI
docker commit vivado_install vivado:installed
docker build -t vivado:2016.01 -f Dockerfile-commit .
```

## Run

```
docker run -ti -p 5900:5900 -v `pwd`/work:/home/vivado/ --rm vivado:2016.01
```

and, connect to VNC server on the container.

```
open vnc://127.0.0.1:5900
```
4 changes: 4 additions & 0 deletions files/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

vncserver -geometry ${GEOMETRY} :0
/opt/Xilinx/Vivado/2016.1/bin/vivado
4 changes: 4 additions & 0 deletions files/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

vncserver :0
/opt/Xilinx_Vivado_SDK_2016.1_0409_1_Lin64.bin
11 changes: 11 additions & 0 deletions files/xstartup
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-window-manager &

0 comments on commit bfb5d83

Please sign in to comment.