0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐳 Minor improvements on devenv docker image.

This commit is contained in:
Andrey Antukh 2021-03-17 15:54:50 +01:00 committed by Andrés Moya
parent 4a58a429d4
commit dd4930e055
5 changed files with 35 additions and 89 deletions

View file

@ -42,7 +42,6 @@ RUN set -ex; \
python \
build-essential \
imagemagick \
librsvg2-bin \
netpbm \
potrace \
webp \
@ -94,17 +93,20 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*;
RUN set -ex; \
mkdir -p /usr/share/man/man1; \
mkdir -p /usr/share/man/man7; \
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -; \
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ focal main" >> /etc/apt/sources.list.d/adoptopenjdk.list; \
apt-get -qq update; \
apt-get -qqy install adoptopenjdk-15-hotspot; \
rm -rf /var/lib/apt/lists/*; \
wget "https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh"; \
chmod +x "linux-install-$CLOJURE_VERSION.sh"; \
"./linux-install-$CLOJURE_VERSION.sh"; \
rm -rf "linux-install-$CLOJURE_VERSION.sh"
curl -LfsSo /tmp/openjdk.tar.gz https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz; \
mkdir -p /usr/lib/jvm/openjdk16; \
cd /usr/lib/jvm/openjdk16; \
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
rm -rf /tmp/openjdk.tar.gz;
ENV PATH="/usr/lib/jvm/openjdk16/bin:/usr/local/nodejs/bin:$PATH" \
JAVA_HOME=/usr/lib/jvm/openjdk16
RUN set -ex; \
curl -LfsSo /tmp/clojure.sh https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh; \
chmod +x /tmp/clojure.sh; \
/tmp/clojure.sh; \
rm -rf /tmp/clojure.sh;
RUN set -ex; \
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -; \
@ -113,24 +115,18 @@ RUN set -ex; \
apt-get -qqy install postgresql-client-13; \
rm -rf /var/lib/apt/lists/*;
COPY files/phantomjs-mock /usr/bin/phantomjs
COPY files/bashrc /root/.bashrc
COPY files/vimrc /root/.vimrc
COPY files/tmux.conf /root/.tmux.conf
WORKDIR /home
RUN set -ex; \
mkdir -p /tmp/node; \
cd /tmp/node; \
export PATH="$PATH:/usr/local/nodejs/bin"; \
wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.xz; \
tar xvf node-$NODE_VERSION-linux-x64.tar.xz; \
mv /tmp/node/node-$NODE_VERSION-linux-x64 /usr/local/nodejs; \
curl -LfsSo /tmp/nodejs.tar.xz https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-x64.tar.xz; \
mkdir -p /usr/local/nodejs; \
cd /usr/local/nodejs; \
tar -xf /tmp/nodejs.tar.xz --strip-components=1; \
chown -R root /usr/local/nodejs; \
PATH="$PATH:/usr/local/nodejs/bin"; \
/usr/local/nodejs/bin/npm install -g yarn; \
/usr/local/nodejs/bin/npm install -g svgo; \
rm -rf /tmp/node;
rm -rf /tmp/nodejs.tar.xz;
RUN set -ex; \
cd /tmp; \
@ -145,10 +141,15 @@ EXPOSE 3449
EXPOSE 6060
EXPOSE 9090
COPY files/phantomjs-mock /usr/bin/phantomjs
COPY files/bashrc /root/.bashrc
COPY files/vimrc /root/.vimrc
COPY files/tmux.conf /root/.tmux.conf
COPY files/start-tmux.sh /home/start-tmux.sh
COPY files/entrypoint.sh /home/entrypoint.sh
COPY files/init.sh /home/init.sh
COPY files/bashrc /home/penpot/.bashrc
ENTRYPOINT ["/home/entrypoint.sh"]
CMD ["/home/init.sh"]

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH=/usr/local/nodejs/bin:$PATH
export PATH=/usr/lib/jvm/openjdk16/bin:/usr/local/nodejs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
alias l='ls --color -GFlh'
alias rm='rm -r'

View file

@ -1,5 +1,10 @@
#!/usr/bin/env bash
cp /root/.bashrc /home/penpot/.bashrc
cp /root/.vimrc /home/penpot/.vimrc
cp /root/.tmux.conf /home/penpot/.tmux.conf
chown -R penpot:users /home/penpot
set -e
nginx
tail -f /dev/null

View file

@ -1,17 +1,13 @@
#!/usr/bin/env bash
sudo cp /root/.bashrc /home/penpot/.bashrc
sudo cp /root/.vimrc /home/penpot/.vimrc
sudo cp /root/.tmux.conf /home/penpot/.tmux.conf
source /home/penpot/.bashrc
sudo chown penpot:users /home/penpot
cd ~;
set -e;
source ~/.bashrc
set -e;
echo "[start-tmux.sh] Installing node dependencies"
pushd ~/penpot/frontend/
yarn install
@ -43,6 +39,6 @@ tmux send-keys -t penpot './scripts/start-dev' enter
tmux rename-window -t penpot:0 'gulp'
tmux select-window -t penpot:0
tmux send-keys -t penpot 'cd penpot/frontend' enter C-l
tmux send-keys -t penpot 'npx gulp --theme=${PENPOT_THEME} watch' enter
tmux send-keys -t penpot 'npx gulp watch' enter
tmux -2 attach-session -t penpot

View file

@ -1,56 +0,0 @@
#!/usr/bin/env zsh
export EDITOR=vim
bindkey "^[[3~" delete-char
bindkey "^[3;5~" delete-char
bindkey '^R' history-incremental-search-backward
bindkey -e
autoload -U promptinit
promptinit
prompt suse
#------------------------------
## Comp stuff
##------------------------------
zmodload zsh/complist
autoload -Uz compinit
compinit
#------------------------------
# Alias stuff
#------------------------------
alias cp='cp -r'
alias ls='ls -F'
alias l='ls -Flha'
alias rm='rm -r'
alias ls='ls --color -F'
alias lsd='ls -d *(/)'
alias lsf='ls -h *(.)'
#-----------------
# Options
#-----------------
setopt AUTO_CD # implicate cd for non-commands
setopt CORRECT_ALL # correct spelling
setopt COMPLETE_IN_WORD # complete commands anywhere in the word
setopt NOTIFY # Notify when jobs finish
setopt BASH_AUTO_LIST # Autolist options on repeition of ambiguous args
setopt AUTO_PUSHD # Push dirs into history
setopt MULTIOS # Allow Multiple pipes
setopt MAGIC_EQUAL_SUBST # Expand inside equals
setopt EXTENDED_GLOB
setopt NOBEEP
setopt INC_APPEND_HISTORY
export HISTSIZE=100000
export SAVEHIST=100000
export HISTFILE=~/local/.zhistory
setopt hist_ignore_all_dups
setopt hist_ignore_space
export PATH=$HOME/.local/bin:$PATH
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm