-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (38 loc) · 1.55 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
FROM ros:galactic-ros-base-focal
# Install requirements
RUN apt-get update # cache-bump-1
RUN apt-get install -y nodejs npm python python3 python-is-python2
RUN apt-get install -y supervisor
RUN apt-get install -y libjansson-dev libboost-dev imagemagick libtinyxml-dev mercurial cmake build-essential
RUN apt-get install -y ros-galactic-gazebo-ros-pkgs ros-galactic-xacro ros-galactic-robot-localization
# Drop privileges
RUN useradd --create-home -s /bin/bash cake
RUN mkdir /sim && chown cake:cake /sim
USER cake
WORKDIR /sim
# Fetch gzweb
RUN git clone https://github.com/osrf/gzweb
# Copy gazebo_models
## NOTE: Download the models localy using this command:
## `git clone --depth 1 -b master https://github.com/osrf/gazebo_models`
RUN mkdir /home/cake/.gazebo
COPY --chown=cake:cake gazebo_models /home/cake/.gazebo/models
# Build gzweb
WORKDIR /sim/gzweb
RUN git checkout gzweb_1.4.1
RUN bash -c "git apply <(git show 9a24cfd340ffdcd0512bc257df3ff5e4d74b4691) # HTTPS SUPPORT"
COPY --chown=cake:cake build_local_models.patch ./build_local_models.patch
RUN bash -c "git apply build_local_models.patch"
RUN bash -c "source /usr/share/gazebo/setup.sh && npm run deploy --- -m"
# Copy gzserver launcher
COPY --chown=cake:cake assets /sim/assets
RUN mkdir -p /sim/launcher
COPY --chown=cake:cake launcher /sim/launcher/launcher
# Config supervisord
COPY --chown=cake:cake supervisor.conf /sim/supervisord.conf
EXPOSE 8080
# Run
WORKDIR /sim
COPY --chown=cake:cake entrypoint.bash /sim/entrypoint.bash
## ENTRYPOINT sources /ros_entry into shell
CMD ["bash", "entrypoint.bash"]