mirror of
				https://github.com/wazuh/wazuh-docker.git
				synced 2025-11-03 21:43:15 +00:00 
			
		
		
		
	Merge pull request #1475 from wazuh/bug/1473-docker-images-build-errors
Error messages building 4.9.0 Docker images
This commit is contained in:
		
							
								
								
									
										17
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							@@ -10,6 +10,11 @@ jobs:
 | 
			
		||||
    - name: Check out code
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
    - name: Install docker-compose
 | 
			
		||||
      run: |
 | 
			
		||||
        curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 | 
			
		||||
        chmod +x /usr/local/bin/docker-compose
 | 
			
		||||
 | 
			
		||||
    - name: Build Wazuh images
 | 
			
		||||
      run: build-docker-images/build-images.sh
 | 
			
		||||
 | 
			
		||||
@@ -63,6 +68,11 @@ jobs:
 | 
			
		||||
    - name: Check out code
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
    - name: Install docker-compose
 | 
			
		||||
      run: |
 | 
			
		||||
        curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 | 
			
		||||
        chmod +x /usr/local/bin/docker-compose
 | 
			
		||||
 | 
			
		||||
    - name: Create enviroment variables
 | 
			
		||||
      run: cat .env > $GITHUB_ENV
 | 
			
		||||
 | 
			
		||||
@@ -186,6 +196,11 @@ jobs:
 | 
			
		||||
    - name: Check out code
 | 
			
		||||
      uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
    - name: Install docker-compose
 | 
			
		||||
      run: |
 | 
			
		||||
        curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 | 
			
		||||
        chmod +x /usr/local/bin/docker-compose
 | 
			
		||||
 | 
			
		||||
    - name: Create enviroment variables
 | 
			
		||||
      run: cat .env > $GITHUB_ENV
 | 
			
		||||
 | 
			
		||||
@@ -232,7 +247,7 @@ jobs:
 | 
			
		||||
         echo 'Waiting for Wazuh indexer start'
 | 
			
		||||
         free -m
 | 
			
		||||
         df -h
 | 
			
		||||
         sleep 10
 | 
			
		||||
         sleep 120
 | 
			
		||||
       done
 | 
			
		||||
       status_green="`curl -XGET "https://0.0.0.0:9200/_cluster/health" -u admin:SecretPassword -k -s | grep green | wc -l`"
 | 
			
		||||
       if [[ $status_green -eq 1 ]]; then
 | 
			
		||||
 
 | 
			
		||||
@@ -72,20 +72,6 @@ mkdir -p ${TARGET_DIR}/usr/lib/tmpfiles.d
 | 
			
		||||
mkdir -p ${TARGET_DIR}/usr/lib/sysctl.d
 | 
			
		||||
mkdir -p ${TARGET_DIR}/usr/lib/systemd/system
 | 
			
		||||
mkdir -p ${TARGET_DIR}${CONFIG_DIR}/certs
 | 
			
		||||
# Move configuration files for wazuh-indexer
 | 
			
		||||
mv -f ${BASE_DIR}/etc/init.d/${NAME} ${TARGET_DIR}/etc/init.d/${NAME}
 | 
			
		||||
mv -f ${BASE_DIR}/etc/wazuh-indexer/* ${TARGET_DIR}${CONFIG_DIR}
 | 
			
		||||
mv -f ${BASE_DIR}/etc/sysconfig/${NAME} ${TARGET_DIR}/etc/default/
 | 
			
		||||
mv -f ${BASE_DIR}/usr/lib/tmpfiles.d/* ${TARGET_DIR}/usr/lib/tmpfiles.d/
 | 
			
		||||
mv -f ${BASE_DIR}/usr/lib/sysctl.d/* ${TARGET_DIR}/usr/lib/sysctl.d/
 | 
			
		||||
mv -f ${BASE_DIR}/usr/lib/systemd/system/* ${TARGET_DIR}/usr/lib/systemd/system/
 | 
			
		||||
rm -rf ${BASE_DIR}/etc
 | 
			
		||||
rm -rf ${BASE_DIR}/usr
 | 
			
		||||
# Copy installation files to final location
 | 
			
		||||
cp -pr ${BASE_DIR}/* ${TARGET_DIR}${INSTALLATION_DIR}
 | 
			
		||||
# Copy the security tools
 | 
			
		||||
cp /$CERT_TOOL ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/tools/
 | 
			
		||||
cp /$PASSWORD_TOOL ${TARGET_DIR}${INSTALLATION_DIR}/plugins/opensearch-security/tools/
 | 
			
		||||
# Copy Wazuh's config files for the security plugin
 | 
			
		||||
cp -pr /roles_mapping.yml ${TARGET_DIR}${INSTALLATION_DIR}/opensearch-security/
 | 
			
		||||
cp -pr /roles.yml ${TARGET_DIR}${INSTALLATION_DIR}/opensearch-security/
 | 
			
		||||
@@ -101,9 +87,9 @@ cp -pr /wazuh-certificates/admin.pem ${TARGET_DIR}${CONFIG_DIR}/certs/admin.pem
 | 
			
		||||
cp -pr /wazuh-certificates/admin-key.pem ${TARGET_DIR}${CONFIG_DIR}/certs/admin-key.pem
 | 
			
		||||
 | 
			
		||||
# Delete xms and xmx parameters in jvm.options
 | 
			
		||||
sed '/-Xms/d' -i ${TARGET_DIR}${CONFIG_DIR}/jvm.options
 | 
			
		||||
sed '/-Xmx/d' -i ${TARGET_DIR}${CONFIG_DIR}/jvm.options
 | 
			
		||||
sed -i 's/-Djava.security.policy=file:\/\/\/etc\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/-Djava.security.policy=file:\/\/\/usr\/share\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/g' ${TARGET_DIR}${CONFIG_DIR}/jvm.options
 | 
			
		||||
sed '/-Xms/d' -i /etc/wazuh-indexer/jvm.options
 | 
			
		||||
sed '/-Xmx/d' -i /etc/wazuh-indexer/jvm.options
 | 
			
		||||
sed -i 's/-Djava.security.policy=file:\/\/\/etc\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/-Djava.security.policy=file:\/\/\/usr\/share\/wazuh-indexer\/opensearch-performance-analyzer\/opensearch_security.policy/g' /etc/wazuh-indexer/jvm.options
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
chmod -R 500 ${TARGET_DIR}${CONFIG_DIR}/certs
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/aws/subscribers/sqs_message_proc
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/aws/subscribers/sqs_queue.py"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/azure-logs"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/azure-logs.py"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/orm.py"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/azure/db/orm.py"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/docker/DockerListener"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/docker/DockerListener.py"
 | 
			
		||||
PERMANENT_DATA_EXCP[((i++))]="/var/ossec/wodles/gcloud/gcloud"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user