LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   I need help on setting up docker-compose (https://www.linuxquestions.org/questions/linux-containers-122/i-need-help-on-setting-up-docker-compose-4175669287/)

blason 02-10-2020 01:42 AM

I need help on setting up docker-compose
 
Hi Folks,

I am setting HoneySAP docker image and have built the image using Dockerfile however I am not sure how do I setup docker-compose file from below Dockerfile.

Can someone please guide me?

TIA
Blason R

Code:

# HoneySAP Dockerfile for running HoneySAP

FROM ubuntu:18.04

MAINTAINER mgallo@secureauth.com

# Install system packages
RUN apt-get update && apt-get install -y \
        git \
        python-pip \
        python-dev \
        build-essential && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

COPY . /opt/honeysap
WORKDIR /opt/honeysap

# Clone git repo and install HoneySAP
RUN cd /opt/honeysap && \
    python setup.py install && \
    rm -rf /tmp/* /var/tmp/*

# Install extra python packages
RUN pip install -r requirements-optional.txt

EXPOSE 3299 8001

CMD ["/usr/local/bin/honeysap", "--config-file", "honeysap.yml"]

here is something I prepared

Code:

# honeysap service
  honeyspa:
    container_name: honeysap
    restart: always
    tmpfs:
    - /tmp/honeysap:uid=2000,gid=2000
    - /tmp/honeysap/data:uid=2000,gid=2000
    networks:
    - honeysap_net
    ports:
    - "3299:3299"
    - "8001:8001"
    image: "xxsx/xxxhoneysap:1903"
    read_only: true
    volumes:
    - /var/log/data/honeysap/logs:/home/honeysap/logs


TB0ne 02-13-2020 07:45 AM

Quote:

Originally Posted by blason (Post 6088264)
Hi Folks,
I am setting HoneySAP docker image and have built the image using Dockerfile however I am not sure how do I setup docker-compose file from below Dockerfile. Can someone please guide me?

Putting your exact question into Google pulls up the Docker documentation as the first hit, which has a how-to that tells you how to set up the file, deploy it, etc., all with pictures and a step-by-step guide.
https://docs.docker.com/compose/gettingstarted/

Read the "Question Guidelines" link in my posting signature.


All times are GMT -5. The time now is 08:05 PM.