Skip to content

Commit f02d874

Browse files
committed
Update docker file
1 parent dc90162 commit f02d874

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

Dockerfile

+29-31
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Copyright (c) 2024 Erich L Foster
2-
#
2+
#
33
# Permission is hereby granted, free of charge, to any person obtaining a copy of
44
# this software and associated documentation files (the "Software"), to deal in
55
# the Software without restriction, including without limitation the rights to
66
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
77
# of the Software, and to permit persons to whom the Software is furnished to do
88
# so, subject to the following conditions:
9-
#
9+
#
1010
# The above copyright notice and this permission notice shall be included in all
1111
# copies or substantial portions of the Software.
12-
#
12+
#
1313
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1515
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -20,6 +20,31 @@
2020

2121
FROM ubuntu:22.04 as builder
2222

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+
2348
ENV USER_NAME=my-app
2449
ARG GROUP_NAME=$USER_NAME
2550
ARG USER_ID=1000
@@ -31,37 +56,10 @@ RUN groupadd --gid $GROUP_ID $GROUP_NAME && \
3156
&& apt-get update \
3257
&& apt-get install -y --no-install-recommends sudo \
3358
&& 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
3560

3661
# Switch to user
3762
USER $USER_NAME
3863

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-
6664
# this will prevent the .local directory from being owned by root on bind mount
6765
RUN mkdir -p /home/$USER_NAME/.local/share/nvim/lazy

0 commit comments

Comments
 (0)