-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
67 lines (67 loc) · 1.48 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Docker Container for workspace4rs
# sudo docker build -t jimurrito/workspace4rs:latest .
FROM ubuntu:kinetic
#
# > ENV + ARGS
ENV VER=1.2.221211
# user config
#ARG USER=root # custom user will be fixed in the future
#ENV USER=${USER}
ENV USER=root
ARG PSWD=ferris
ENV PSWD=${PSWD}
# OPTIONAL setting for default VS Code extensions (NOT WORKING)
#ARG DEFAULT_VSC_EXT=1
#ENV DEFAULT_VSC_EXT=${DEFAULT_VSC_EXT}
# OPTIONAL Git user and email input
ARG GIT_USER_NAME=""
ENV GIT_USER_NAME=${GIT_USER_NAME}
ARG GIT_USER_EMAIL=""
ENV GIT_USER_EMAIL=${GIT_USER_EMAIL}
# build const
ENV WORKSPACE_DIR=${HOME}/workspaces
ENV KEYS_DIR=${HOME}/keys
# enable SSH port for VScode remoting
EXPOSE 22
#
# Update repos caches and packages
RUN apt update && apt install --upgrade -y
# Build Dirs
RUN mkdir /buildscripts /wksp /wksplogs
# Import build scripts
ADD ./buildscripts /buildscripts
WORKDIR /buildscripts
#
# > Set user password
RUN sh ./user.sh
# > Set user
USER ${USER}
#
# > Set Setup SSH Server
RUN sh ./ssh.sh
# > Install VsCode
RUN sh ./vscode.sh
# > Install Python3-Pip
RUN sh ./python.sh
# > Install Rust
RUN sh ./rust.sh
# > Install Docker
RUN sh ./docker.sh
# > Install Misc.
RUN apt install nano vim -y
#
# > Configure workspace commands
ADD ./scripts /wksp
#
# > Final Setup
RUN sh ./setup.sh
#
# > Volume for docker config
VOLUME [ "/var/lib/docker" ]
# > Volume for Workspace share
VOLUME [ "/workspace" ]
# > Volume for keys share
VOLUME [ "/keys" ]
#
# Entry point is running VScode server
CMD sh ./startup.sh