-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.shopify
97 lines (81 loc) · 2.42 KB
/
Dockerfile.shopify
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Use the latest Debian as the base image
FROM debian:bullseye AS base
# Set environment variable to make install non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Break pip system packages
ENV PIP_BREAK_SYSTEM_PACKAGES=1
# Update and install dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
xclip \
ripgrep \
unzip \
git \
bash \
build-essential \
python3 \
python3.10 \
python3-pip \
ca-certificates \
openssl \
libssl-dev \
libreadline-dev \
zlib1g-dev \
libsqlite3-dev \
libffi-dev \
libyaml-dev \
autoconf \
bison \
libgdbm-dev \
libncurses5-dev \
libtool \
libgmp-dev \
libgmp10 \
libgdbm6 \
libgdbm-compat-dev
# Install rbenv and Ruby-build for managing Ruby versions
RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv && \
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build && \
~/.rbenv/plugins/ruby-build/install.sh
# Set rbenv path
ENV PATH="/root/.rbenv/bin:/root/.rbenv/shims:$PATH"
# Install Ruby 3.x.x using rbenv (you can specify any version you prefer)
RUN rbenv install 3.2.0 && \
rbenv global 3.2.0
# Install Bundler
RUN gem install bundler
# Install Neovim
RUN curl -L -O "https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz" && \
tar xzvf nvim-linux64.tar.gz
# Install Node.js using NVM
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION v20.10.0
RUN mkdir -p $NVM_DIR \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
# Set PATH for Node.js
ENV PATH "$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH"
# Install Node.js packages
RUN npm i -g vscode-langservers-extracted \
yaml-language-server prettier \
@johnnymorganz/stylua-bin \
@shopify/cli@latest \
pnpm
# Configure Git
RUN git config --global --add safe.directory '*' \
&& git config --global user.name "Carlos Molero" \
&& git config --global user.email "carlos@novascript.io" \
&& git config --global core.editor "nvim"
# Setup BASH-IT
RUN git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it && ~/.bash_it/install.sh
# Use custom .bashrc
COPY ./bashrc-template.txt /root/bashrc-template.txt
RUN mv ~/bashrc-template.txt ~/.bashrc
# Set the working directory
WORKDIR /workspace
# Keep the container running
CMD ["sleep", "infinity"]