move basic distro setup out to shell script
This commit is contained in:
parent
46bcc0864c
commit
a420944d6a
61
01ubuntu.sh
Normal file
61
01ubuntu.sh
Normal file
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# setup mirror source
|
||||
MRUM="main restricted universe multiverse"
|
||||
cat > /etc/apt/sources.list << EOF
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports $MRUM
|
||||
EOF
|
||||
|
||||
# update
|
||||
apt update && apt upgrade -y
|
||||
|
||||
# deliberate decision to use distro docker and not latest
|
||||
PKGS="
|
||||
apt-file
|
||||
apt-utils
|
||||
bash-completion
|
||||
build-essential
|
||||
byobu
|
||||
command-not-found
|
||||
cryptsetup-bin
|
||||
docker.io
|
||||
gconf-service
|
||||
gconf2
|
||||
git
|
||||
golang-go
|
||||
gvfs-bin
|
||||
htop
|
||||
libasound2
|
||||
libcurl4
|
||||
libgtk-3-0
|
||||
libnotify4
|
||||
libnss3
|
||||
libx11-xcb1
|
||||
libxkbfile1
|
||||
libxss1
|
||||
libxtst6
|
||||
lsof
|
||||
ntp
|
||||
ntpdate
|
||||
openssh-server
|
||||
pbzip2
|
||||
pv
|
||||
python-pip
|
||||
python3-dev
|
||||
python3-pip
|
||||
ruby
|
||||
software-properties-common
|
||||
strace
|
||||
vim
|
||||
xdg-utils
|
||||
"
|
||||
|
||||
apt install -y $PKGS
|
||||
|
||||
# update apt-file cache
|
||||
apt-file update
|
71
Dockerfile
71
Dockerfile
@ -1,49 +1,52 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
ADD ./setup-mirror /tmp/setup-mirror
|
||||
RUN bash /tmp/setup-mirror && rm /tmp/setup-mirror
|
||||
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# deliberate decision to use distro docker and not latest
|
||||
|
||||
RUN apt install -y \
|
||||
apt-file \
|
||||
bash-completion \
|
||||
build-essential \
|
||||
byobu \
|
||||
command-not-found \
|
||||
docker.io \
|
||||
git \
|
||||
golang-go \
|
||||
ntp \
|
||||
ntpdate \
|
||||
openssh-server \
|
||||
python-pip \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
ruby \
|
||||
software-properties-common \
|
||||
vim
|
||||
|
||||
RUN apt-file update
|
||||
|
||||
|
||||
RUN apt install -y powerline
|
||||
RUN apt install -y htop
|
||||
RUN apt install -y cryptsetup-bin
|
||||
ADD ./01ubuntu.sh /tmp/01ubuntu.sh
|
||||
RUN bash /tmp/01ubuntu.sh && rm /tmp/01ubuntu.sh
|
||||
|
||||
########################################################
|
||||
##### python3 stuff
|
||||
########################################################
|
||||
RUN pip3 install --upgrade pip
|
||||
RUN pip3 install awscli
|
||||
RUN pip3 install httpie
|
||||
RUN pip3 install pipenv
|
||||
RUN pip3 install powerline-shell
|
||||
RUN pip3 install virtualenv
|
||||
|
||||
########################################################
|
||||
##### nvm
|
||||
########################################################
|
||||
RUN git clone https://github.com/creationix/nvm.git /usr/local/nvm
|
||||
ADD ./nvmsetup.sh /etc/profile.d/nvmsetup.sh
|
||||
RUN \
|
||||
source /etc/profile.d/nvmsetup.sh && \
|
||||
nvm install --lts && \
|
||||
nvm use default
|
||||
|
||||
########################################################
|
||||
##### ruby
|
||||
########################################################
|
||||
RUN gem install bundler
|
||||
RUN gem install rake
|
||||
|
||||
########################################################
|
||||
##### atom
|
||||
########################################################
|
||||
ADD https://atom.io/download/deb /tmp/atom.deb
|
||||
RUN dpkg -i /tmp/atom.deb
|
||||
|
||||
########################################################
|
||||
##### javascript, my favorite
|
||||
########################################################
|
||||
# FIXME(sneak)
|
||||
# yarn babel create-react-app jetpack prettier
|
||||
|
||||
# yes i know yarn says not to install it this way
|
||||
RUN \
|
||||
source /etc/profile.d/nvmsetup.sh && \
|
||||
nvm use default && \
|
||||
npm install -g npm && \
|
||||
npm install -g yarn
|
||||
|
||||
RUN yarn global add prettier
|
||||
RUN yarn global add create-react-app
|
||||
|
10
setup-mirror
10
setup-mirror
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
MRUM="main restricted universe multiverse"
|
||||
|
||||
cat > /etc/apt/sources.list << EOF
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security $MRUM
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports $MRUM
|
||||
EOF
|
Loading…
Reference in New Issue
Block a user