Skip to content

Commit

Permalink
build tree-sitter again in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
StachuDotNet committed Sep 18, 2024
1 parent 4299937 commit 713821d
Showing 1 changed file with 98 additions and 98 deletions.
196 changes: 98 additions & 98 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ ARG gid=1000
############################
USER root
RUN DEBIAN_FRONTEND=noninteractive \
apt update --allow-releaseinfo-change && \
DEBIAN_FRONTEND=noninteractive \
apt install \
-y \
--no-install-recommends \
curl \
apt-transport-https \
ca-certificates \
lsb-release \
less \
gpg \
gpg-agent \
file \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
apt update --allow-releaseinfo-change && \
DEBIAN_FRONTEND=noninteractive \
apt install \
-y \
--no-install-recommends \
curl \
apt-transport-https \
ca-certificates \
lsb-release \
less \
gpg \
gpg-agent \
file \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

# Latest NPM (taken from https://deb.nodesource.com)
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
Expand Down Expand Up @@ -90,63 +90,63 @@ RUN echo "deb https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc
# - apt-transport-https for npm
# - net-tools for netstat
RUN DEBIAN_FRONTEND=noninteractive \
apt update --allow-releaseinfo-change && \
DEBIAN_FRONTEND=noninteractive \
apt install \
--no-install-recommends \
-y \
rsync \
git \
wget \
sudo \
locales \
postgresql-14 \
postgresql-client-14 \
postgresql-contrib-14 \
git-restore-mtime \
nodejs \
google-cloud-sdk \
google-cloud-sdk-pubsub-emulator \
google-cloud-sdk-gke-gcloud-auth-plugin \
jq \
parallel \
# yugabyte
ntp \
vim \
unzip \
docker-ce \
docker-buildx-plugin \
python3-pip \
python3-setuptools \
python3-dev \
python3-venv \
libsodium-dev \
libssl-dev \
zlib1g-dev \
pv \
htop \
net-tools \
bash-completion \
openssh-server \
dnsutils \
# .NET dependencies - https://github.com/dotnet/dotnet-docker/blob/master/src/runtime-deps/3.1/bionic/amd64/Dockerfile
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu74 \
libssl3 \
libstdc++6 \
zlib1g \
# end .NET dependencies
# parser (tree-sitter) dependencies
build-essential \
# end parser dependencies
# prodexec dependencies
sshpass \
# end prodexec dependencies
psmisc \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
apt update --allow-releaseinfo-change && \
DEBIAN_FRONTEND=noninteractive \
apt install \
--no-install-recommends \
-y \
rsync \
git \
wget \
sudo \
locales \
postgresql-14 \
postgresql-client-14 \
postgresql-contrib-14 \
git-restore-mtime \
nodejs \
google-cloud-sdk \
google-cloud-sdk-pubsub-emulator \
google-cloud-sdk-gke-gcloud-auth-plugin \
jq \
parallel \
# yugabyte
ntp \
vim \
unzip \
docker-ce \
docker-buildx-plugin \
python3-pip \
python3-setuptools \
python3-dev \
python3-venv \
libsodium-dev \
libssl-dev \
zlib1g-dev \
pv \
htop \
net-tools \
bash-completion \
openssh-server \
dnsutils \
# .NET dependencies - https://github.com/dotnet/dotnet-docker/blob/master/src/runtime-deps/3.1/bionic/amd64/Dockerfile
libc6 \
libgcc1 \
libgssapi-krb5-2 \
libicu74 \
libssl3 \
libstdc++6 \
zlib1g \
# end .NET dependencies
# parser (tree-sitter) dependencies
build-essential \
# end parser dependencies
# prodexec dependencies
sshpass \
# end prodexec dependencies
psmisc \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*


# As of Ubuntu 24.04, an install includes
Expand All @@ -161,7 +161,7 @@ RUN usermod -u 2000 ubuntu && groupmod -g 2000 ubuntu
############################
USER root
RUN groupadd -g ${gid} dark \
&& adduser --disabled-password --gecos '' --uid ${uid} --gid ${gid} dark
&& adduser --disabled-password --gecos '' --uid ${uid} --gid ${gid} dark
RUN echo "dark:dark" | chpasswd && adduser dark sudo
RUN sudo chown -R dark:dark /home/dark
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
Expand Down Expand Up @@ -193,9 +193,9 @@ RUN sudo npm install -g [email protected]
############################
USER postgres
RUN /etc/init.d/postgresql start && \
psql --command "CREATE USER dark WITH SUPERUSER PASSWORD 'darklang';" && \
createdb -O dark devdb && \
createdb -O dark testdb
psql --command "CREATE USER dark WITH SUPERUSER PASSWORD 'darklang';" && \
createdb -O dark devdb && \
createdb -O dark testdb

# Adjust PostgreSQL configuration so that remote connections to the
# database are possible.
Expand Down Expand Up @@ -276,10 +276,10 @@ RUN curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/ma
RUN \
VERSION=v0.9.0 \
&& case ${TARGETARCH} in \
arm64) FILENAME=shellcheck-$VERSION.linux.aarch64.tar.xz;; \
amd64) FILENAME=shellcheck-$VERSION.linux.x86_64.tar.xz;; \
*) exit 1;; \
esac \
arm64) FILENAME=shellcheck-$VERSION.linux.aarch64.tar.xz;; \
amd64) FILENAME=shellcheck-$VERSION.linux.x86_64.tar.xz;; \
*) exit 1;; \
esac \
&& /home/dark/install-targz-file \
--arm64-sha256=179c579ef3481317d130adebede74a34dbbc2df961a70916dd4039ebf0735fae \
--amd64-sha256=700324c6dd0ebea0117591c6cc9d7350d9c7c5c287acbad7630fa17b1d4d9e2f \
Expand Down Expand Up @@ -307,17 +307,17 @@ RUN /home/dark/install-exe-file \
# (runtime-deps, runtime, and sdk), see
# https://github.com/dotnet/dotnet-docker/blob/master/src

# Skip extraction of XML docs - generally not useful within an
# image/container - helps performance
# Skip extraction of XML docs - generally not useful within an
# image/container - helps performance
ENV NUGET_XMLDOC_MODE=skip \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Do not generate certificate
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
# Do not show first run text
DOTNET_NOLOGO=true \
# Enable correct mode for dotnet watch (only mode supported in a container)
DOTNET_USE_POLLING_FILE_WATCHER=true
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Do not generate certificate
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
# Do not show first run text
DOTNET_NOLOGO=true \
# Enable correct mode for dotnet watch (only mode supported in a container)
DOTNET_USE_POLLING_FILE_WATCHER=true

RUN /home/dark/install-dotnet8 \
--version=8.0.303 \
Expand All @@ -335,14 +335,14 @@ ENV NUGET_SCRATCH=/tmp/NuGetScratch
# Emscripten,
# for compiling the tree-sitter parser to wasm
#############
# RUN git clone https://github.com/emscripten-core/emsdk.git --depth 1 \
# && cd emsdk \
# # TODO pin to a recent stable version (i.e. 3.1.37)
# # we are using the latest version because Linux arm64 binaries aren't available in all releases.
# # see: https://github.com/emscripten-core/emscripten/issues/19275
# && ./emsdk install latest \
# && ./emsdk activate latest
# ENV PATH="$PATH:/home/dark/emsdk/upstream/emscripten"
RUN git clone https://github.com/emscripten-core/emsdk.git --depth 1 \
&& cd emsdk \
# TODO pin to a recent stable version (i.e. 3.1.37)
# we are using the latest version because Linux arm64 binaries aren't available in all releases.
# see: https://github.com/emscripten-core/emscripten/issues/19275
&& ./emsdk install latest \
&& ./emsdk activate latest
ENV PATH="$PATH:/home/dark/emsdk/upstream/emscripten"


#############
Expand Down

0 comments on commit 713821d

Please sign in to comment.