FROM ign-gazebo:base

COPY docker/scripts/enable_ign_stable.sh scripts/enable_ign_stable.sh
RUN scripts/enable_ign_stable.sh

COPY docker/scripts/enable_ign_prerelease.sh scripts/enable_ign_prerelease.sh
RUN scripts/enable_ign_prerelease.sh

COPY docker/scripts/enable_ign_nightly.sh scripts/enable_ign_nightly.sh
RUN scripts/enable_ign_nightly.sh

RUN apt-get update \
 && apt-get install -y \
    libignition-cmake2-dev \
    libignition-common3-dev \
    libignition-fuel-tools4-dev \
    libignition-math6-eigen3-dev \
    libignition-plugin-dev \
    libignition-physics2-dev \
    libignition-rendering3-dev \
    libignition-tools-dev \
    libignition-transport8-dev \
    libignition-gui3-dev \
    libignition-msgs5-dev \
    libignition-sensors3-dev \
    libsdformat9-dev

COPY . ign-gazebo
RUN cd ign-gazebo \
 && ./docker/scripts/build_ign_gazebo.sh

COPY ./docker/scripts/entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
