Skip to content

Commit 7de446f

Browse files
author
Shawn Callegari
committed
Dockerfile cleanup, removing "sudo", x64 fixes
1 parent d317b38 commit 7de446f

File tree

7 files changed

+36
-20
lines changed

7 files changed

+36
-20
lines changed

modules/CameraCapture/amd64.Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ RUN echo "BUILD MODULE: CameraCapture"
55
WORKDIR /app
66

77
RUN apt-get update && \
8-
apt-get install -y --no-install-recommends libcurl4-openssl-dev python3-pip libboost-python-dev libgtk2.0-dev
8+
apt-get install -y --no-install-recommends \
9+
python3 \
10+
python3-pip \
11+
python3-dev \
12+
libcurl4-openssl-dev \
13+
libboost-python-dev \
14+
libgtk2.0-dev
915

1016
# Install Python packages
1117
COPY /build/amd64-requirements.txt ./
@@ -14,8 +20,8 @@ RUN pip3 install --upgrade setuptools
1420
RUN pip3 install -r amd64-requirements.txt
1521

1622
# Cleanup
17-
RUN sudo rm -rf /var/lib/apt/lists/* \
18-
&& sudo apt-get -y autoremove
23+
RUN rm -rf /var/lib/apt/lists/* \
24+
&& apt-get -y autoremove
1925

2026
ADD /app/ .
2127

modules/CameraCapture/arm32v7.Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ RUN install_packages \
3535

3636
# Install Python packages
3737
COPY /build/arm32v7-requirements.txt ./
38-
RUN sudo pip3 install --upgrade pip
39-
RUN sudo pip3 install --upgrade setuptools
40-
RUN sudo pip3 install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
38+
RUN pip3 install --upgrade pip
39+
RUN pip3 install --upgrade setuptools
40+
RUN pip3 install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
4141

4242
# Cleanup
43-
RUN sudo rm -rf /var/lib/apt/lists/* \
44-
&& sudo apt-get -y autoremove
43+
RUN rm -rf /var/lib/apt/lists/* \
44+
&& apt-get -y autoremove
4545

4646
RUN [ "cross-build-end" ]
4747

modules/CameraCapture/test-amd64.Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ RUN echo "BUILD MODULE: CameraCapture"
55
WORKDIR /app
66

77
RUN apt-get update && \
8-
apt-get install -y --no-install-recommends libcurl4-openssl-dev python3-pip libboost-python-dev libgtk2.0-dev
8+
apt-get install -y --no-install-recommends \
9+
python3 \
10+
python3-pip \
11+
python3-dev \
12+
libcurl4-openssl-dev \
13+
libboost-python-dev \
14+
libgtk2.0-dev
915

1016
# Install Python packages
1117
COPY /build/amd64-requirements.txt ./
@@ -14,8 +20,8 @@ RUN pip3 install --upgrade setuptools
1420
RUN pip3 install -r amd64-requirements.txt
1521

1622
# Cleanup
17-
RUN sudo rm -rf /var/lib/apt/lists/* \
18-
&& sudo apt-get -y autoremove
23+
RUN rm -rf /var/lib/apt/lists/* \
24+
&& apt-get -y autoremove
1925

2026
ADD /app/ .
2127
ADD /test/ .

modules/CameraCapture/test-arm32v7.Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ RUN install_packages \
3535

3636
# Install Python packages
3737
COPY /build/arm32v7-requirements.txt ./
38-
RUN sudo pip3 install --upgrade pip
39-
RUN sudo pip3 install --upgrade setuptools
40-
RUN sudo pip3 install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
38+
RUN pip3 install --upgrade pip
39+
RUN pip3 install --upgrade setuptools
40+
RUN pip3 install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
4141

4242
# Cleanup
43-
RUN sudo rm -rf /var/lib/apt/lists/* \
44-
&& sudo apt-get -y autoremove
43+
RUN rm -rf /var/lib/apt/lists/* \
44+
&& apt-get -y autoremove
4545

4646
RUN [ "cross-build-end" ]
4747

modules/ImageClassifierService/arm32v7.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ RUN pip3 install --upgrade setuptools
2525
RUN pip3 install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
2626

2727
# Cleanup
28-
RUN sudo rm -rf /var/lib/apt/lists/* \
29-
&& sudo apt-get -y autoremove
28+
RUN rm -rf /var/lib/apt/lists/* \
29+
&& apt-get -y autoremove
3030

3131
RUN [ "cross-build-end" ]
3232

modules/SenseHatDisplay/arm32v7.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN install_packages \
3131
i2c-tools
3232

3333
# Cleanup
34-
RUN sudo rm -rf /var/lib/apt/lists/* \
35-
&& sudo apt-get -y autoremove
34+
RUN rm -rf /var/lib/apt/lists/* \
35+
&& apt-get -y autoremove
3636

3737
RUN [ "cross-build-end" ]
3838

modules/SenseHatDisplay/test/test-arm32v7.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ RUN install_packages \
3030
libtiff-tools \
3131
i2c-tools
3232

33+
# Cleanup
34+
RUN rm -rf /var/lib/apt/lists/* \
35+
&& apt-get -y autoremove
36+
3337
RUN [ "cross-build-end" ]
3438

3539
ADD /app/ .

0 commit comments

Comments
 (0)