-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (41 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM ubuntu:latest
# enable source repos
RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && apt update
# update
RUN apt-get update
# Set the locale
RUN apt-get install -y locales locales-all
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
# Install some essentials
RUN apt-get install -y \
ubuntu-server \
vim \
python3 \
python3-pip \
ruby \
ruby-dev \
gem \
git \
cmake \
build-essential \
sudo
# Cheat by installing the python and ruby build dependencies
RUN apt-get build-dep -y python3 ruby
# create 'user' user
RUN groupadd -g 1000 user
RUN useradd -rm -d /home/user -s /bin/bash -g user -G sudo -u 1000 user
# Enable passwordless sudo for users under the "sudo" group
RUN sed -i.bkp -e \
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
/etc/sudoers
# Some ruby deps
RUN gem install bundler
# python deps
RUN su - user -c "pip3 install --user black"
USER user
WORKDIR /home/user/work
# copy in the rc files
COPY --chown=user:user rc/ /home/user/