-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (46 loc) · 1.37 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
FROM julia:1.10.0
# create user with a home directory
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
USER root
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git \
unzip \
wget \
&& \
apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* # clean up
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
htop \
nano \
openssh-server \
tig \
tree \
&& \
apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* # clean up
USER ${USER}
WORKDIR /workspace/PkgBump.jl
RUN julia -e 'using Pkg; Pkg.add(["Revise", "LiveServer", "Pluto", "PlutoUI"])' && \
julia -e 'using Pkg; Pkg.add(["BenchmarkTools", "ProfileSVG", "JET", "JuliaFormatter"])'
ENV JULIA_PROJECT "@."
COPY ./src /workspace/PkgBump.jl/src
COPY ./docs/Project.toml /workspace/PkgBump.jl/docs
COPY ./Project.toml /workspace/PkgBump.jl
USER root
RUN chown -R ${NB_UID} /workspace/PkgBump.jl
USER ${USER}
RUN rm -f Manifest.toml && julia -e 'using Pkg; \
Pkg.instantiate(); \
Pkg.precompile()' && \
# Check Julia version \
julia -e 'using InteractiveUtils; versioninfo()'
WORKDIR ${HOME}
USER ${USER}
EXPOSE 8000
CMD ["julia"]