1
1
# Copyright (c) 2024 Erich L Foster
2
- #
2
+ #
3
3
# Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
# this software and associated documentation files (the "Software"), to deal in
5
5
# the Software without restriction, including without limitation the rights to
6
6
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
7
# of the Software, and to permit persons to whom the Software is furnished to do
8
8
# so, subject to the following conditions:
9
- #
9
+ #
10
10
# The above copyright notice and this permission notice shall be included in all
11
11
# copies or substantial portions of the Software.
12
- #
12
+ #
13
13
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
14
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
15
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
20
21
21
FROM ubuntu:22.04 as builder
22
22
23
+ # Install dependencies needed for building devcontainers/cli and developing in neovim
24
+ RUN apt-get update && \
25
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
26
+ apt-utils \
27
+ build-essential \
28
+ curl \
29
+ wget \
30
+ nodejs \
31
+ npm \
32
+ lua5.1 \
33
+ luajit \
34
+ luarocks \
35
+ git \
36
+ # apt clean-up
37
+ && apt-get autoremove -y \
38
+ && rm -rf /var/lib/apt/lists/*
39
+
40
+ WORKDIR /app
41
+
42
+ # Installing the devcontainers CLI
43
+ RUN npm install -g @devcontainers/
[email protected]
44
+
45
+ # Installing Lua Dependencies for testing LUA projects
46
+ RUN luarocks install busted
47
+
23
48
ENV USER_NAME=my-app
24
49
ARG GROUP_NAME=$USER_NAME
25
50
ARG USER_ID=1000
@@ -31,37 +56,10 @@ RUN groupadd --gid $GROUP_ID $GROUP_NAME && \
31
56
&& apt-get update \
32
57
&& apt-get install -y --no-install-recommends sudo \
33
58
&& echo $USER_NAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USER_NAME \
34
- && chmod 0440 /etc/sudoers.d/$USER_NAME
59
+ && chmod 0440 /etc/sudoers.d/$USER_NAME
35
60
36
61
# Switch to user
37
62
USER $USER_NAME
38
63
39
- # Install dependencies needed for building devcontainers/cli and developing in neovim
40
- RUN sudo apt-get update && \
41
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
42
- apt-utils \
43
- build-essential \
44
- curl \
45
- wget \
46
- nodejs \
47
- npm \
48
- lua5.1 \
49
- luajit \
50
- luarocks \
51
- git \
52
- # apt clean-up
53
- && sudo apt-get autoremove -y \
54
- && sudo rm -rf /var/lib/apt/lists/*
55
-
56
- ENV NPM_CONFIG_PREFIX=/home/$USER_NAME/.npm-global
57
-
58
- WORKDIR /app
59
-
60
- # Installing the devcontainers CLI
61
- RUN npm install -g @devcontainers/
[email protected]
62
-
63
- # Installing Lua Dependencies for testing LUA projects
64
- RUN sudo luarocks install busted
65
-
66
64
# this will prevent the .local directory from being owned by root on bind mount
67
65
RUN mkdir -p /home/$USER_NAME/.local/share/nvim/lazy
0 commit comments