Skip to content

Commit

Permalink
Add Dockerfile and docker-compose for the package assembly stage
Browse files Browse the repository at this point in the history
  • Loading branch information
f-galland committed Jan 15, 2024
1 parent 43a9a56 commit a70b048
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 5 deletions.
28 changes: 28 additions & 0 deletions docker/assemble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.9"

services:

wi-assemble:
image: wi-assemble:${VERSION}
container_name: wi-assemble-${VERSION}
build:
context: ./..
dockerfile: ${REPO_PATH}/docker/images/wi-assemble.Dockerfile
# ports:
# # OpenSearch REST API
# - 9200:9200
# # Cross-cluster search
# # - 9250:9250
# # Node communication and transport
# # - 9300:9300
# # Performance Analyzer
# # - 9600:9600
# expose:
# - 9200
volumes:
- ${REPO_PATH}/scripts:/home/wazuh-indexer/scripts
- ${REPO_PATH}/artifacts:/home/wazuh-indexer/artifacts
- ${REPO_PATH}/distribution/packages/src:/home/wazuh-indexer/distribution/packages/src
entrypoint: ['tail', '-f', '/dev/null']
user: "1000:1000"
working_dir: /home/wazuh-indexer
2 changes: 1 addition & 1 deletion docker/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ function main() {
esac
}

main "$@"
main "$@"
23 changes: 19 additions & 4 deletions docker/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: "3.9"

services:

wazuh-indexer:
image: wazuh-indexer-dev:${VERSION}
container_name: wazuh-indexer-dev-${VERSION}
wi-build:
image: wi-build:${VERSION}
container_name: wi-build-${VERSION}
build:
context: ./..
dockerfile: ${REPO_PATH}/docker/images/wi-dev.Dockerfile
dockerfile: ${REPO_PATH}/docker/images/wi-build.Dockerfile
ports:
# OpenSearch REST API
- 9200:9200
Expand All @@ -24,3 +24,18 @@ services:
entrypoint: ['tail', '-f', '/dev/null']
user: "1000:1000"
working_dir: /home/wazuh-indexer/app


wi-assemble:
image: wi-assemble:${VERSION}
container_name: wi-assemble-${VERSION}
build:
context: ./..
dockerfile: ${REPO_PATH}/docker/images/wi-assemble.Dockerfile
volumes:
- ${REPO_PATH}/scripts:/home/wazuh-indexer/scripts
- ${REPO_PATH}/artifacts:/home/wazuh-indexer/artifacts
- ${REPO_PATH}/distribution/packages/src:/home/wazuh-indexer/distribution/packages/src
entrypoint: ['tail', '-f', '/dev/null']
user: "1000:1000"
working_dir: /home/wazuh-indexer
20 changes: 20 additions & 0 deletions docker/images/wi-assemble.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:jammy
RUN mkdir /home/wazuh-indexer && \
apt-get update -y && \
apt-get install curl gnupg2 -y && \
curl -o- https://www.aptly.info/pubkey.txt | apt-key add - && \
echo "deb http://repo.aptly.info/ squeeze main" | tee -a /etc/apt/sources.list.d/aptly.list && \
apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y aptly build-essential cpio debhelper-compat debmake freeglut3 libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-dev libcairo2 libcairo2-dev libcups2 libdrm2 libgbm-dev libgconf-2-4 libnspr4 libnspr4-dev libnss3 libpangocairo-1.0-0 libxcomposite-dev libxdamage1 libxfixes-dev libxfixes3 libxi6 libxkbcommon-x11-0 libxrandr2 libxrender1 libxtst6 rpm rpm2cpio && \
apt-get clean -y && \
dpkg -r lintian && \
addgroup --gid 1000 wazuh-indexer && \
adduser --uid 1000 --ingroup wazuh-indexer --disabled-password --home /home/wazuh-indexer wazuh-indexer && \
chmod 0775 /home/wazuh-indexer && \
chown -R 1000:1000 /home/wazuh-indexer
USER wazuh-indexer
WORKDIR /home/wazuh-indexer



File renamed without changes.

0 comments on commit a70b048

Please sign in to comment.