Commit 90a85a4 1 parent 72d7ac1 commit 90a85a4 Copy full SHA for 90a85a4
File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -9,30 +9,25 @@ ENV DISPLAY=:99
9
9
ENV TERM=xterm
10
10
ENV TZ=UTC
11
11
ENV QEMU_CPU=max,pauth-impdef=on
12
+ ENV RUNS_IN_DOCKER=true
12
13
13
14
# SITL UDP PORTS
14
15
EXPOSE 14556/udp
15
16
EXPOSE 14557/udp
16
17
17
- # Set Up Caching of APT packages
18
- RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
19
- --mount=type=cache,target=/var/lib/apt,sharing=locked \
20
- rm -f /etc/apt/apt.conf.d/docker-clean && \
21
- echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \
22
- apt-get --quiet -y update
23
-
24
18
# Install Shell Script Entrypoint
25
19
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
26
20
27
21
# Install PX4 Requirements
28
22
COPY requirements.txt /tmp/requirements.txt
29
23
COPY ubuntu.sh /tmp/ubuntu.sh
30
- RUN touch /.dockerenv
24
+
31
25
RUN bash /tmp/ubuntu.sh --no-sim-tools
32
26
27
+ # Make sure git is ok with your local copy
33
28
RUN git config --global --add safe.directory '*'
34
29
35
- # create user with id 1001 (jenkins docker workflow default)
30
+ # Create user with id 1001 (jenkins docker workflow default)
36
31
RUN useradd --shell /bin/bash -u 1001 -c "" -m user && usermod -a -G dialout user
37
32
38
33
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 28
28
done
29
29
30
30
echo " [ubuntu.sh] Starting..."
31
- echo " [ubuntu.sh] arch: ${GREEN} $ INSTALL_ARCH${NC} "
31
+ echo " [ubuntu.sh] arch: $INSTALL_ARCH "
32
32
33
33
# detect if running in docker
34
- if [ -f /.dockerenv ]; then
34
+ if [ -z " $RUNS_IN_DOCKER " ]; then
35
35
echo " [ubuntu.sh] Running within docker, installing initial dependencies" ;
36
36
apt-get --quiet -y update && DEBIAN_FRONTEND=noninteractive apt-get --quiet -y install \
37
37
ca-certificates \
58
58
# check ubuntu version
59
59
# otherwise warn and point to docker?
60
60
UBUNTU_RELEASE=" ` lsb_release -rs` "
61
- echo " [ubuntu.sh] Ubuntu ${GREEN}${ UBUNTU_RELEASE}${NC } "
61
+ echo " [ubuntu.sh] Ubuntu ${UBUNTU_RELEASE} "
62
62
echo " [ubuntu.sh] Installing PX4 general dependencies"
63
63
64
64
sudo apt-get update -y --quiet
You can’t perform that action at this time.
0 commit comments