-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.railway
More file actions
38 lines (29 loc) · 1.32 KB
/
Dockerfile.railway
File metadata and controls
38 lines (29 loc) · 1.32 KB
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
FROM sonarqube:25.5.0.107428-community
USER root
# Install required packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
jq \
sed && \
rm -rf /var/lib/apt/lists/*
# Create all required directories
RUN mkdir -p /opt/sonarqube/data /opt/sonarqube/extensions /opt/sonarqube/logs /opt/sonarqube/temp && \
chmod -R 777 /opt/sonarqube
# Copy custom configuration
COPY sonar-properties-override.conf /opt/sonarqube/conf/sonar.properties
COPY elasticsearch-wrapper.sh /opt/sonarqube/elasticsearch/bin/elasticsearch-wrapper
COPY start-sonarqube-railway.sh /opt/sonarqube/bin/run.sh
# Make scripts executable
RUN chmod +x /opt/sonarqube/elasticsearch/bin/elasticsearch-wrapper && \
chmod +x /opt/sonarqube/bin/run.sh
# Replace original elasticsearch with wrapper
RUN mv /opt/sonarqube/elasticsearch/bin/elasticsearch /opt/sonarqube/elasticsearch/bin/elasticsearch.original && \
ln -s /opt/sonarqube/elasticsearch/bin/elasticsearch-wrapper /opt/sonarqube/elasticsearch/bin/elasticsearch
# Set environment
ENV SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true \
RUN_AS_ROOT=true \
SONAR_SEARCH_JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxDirectMemorySize=256m" \
SONAR_SEARCH_JAVA_ADDITIONAL_OPTS="-Des.enforce.bootstrap.checks=false"
EXPOSE 9000
ENTRYPOINT ["/opt/sonarqube/bin/run.sh"]