Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
duartecoelhomovai committed Oct 6, 2023
1 parent 17b4e7e commit 9392c11
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions noetic/Dockerfile-rosfree
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ LABEL maintainer="devops@mov.ai"
# Arguments
ARG USER_ID=1000
ARG HEALTH_NODE_URL="http://health-node:8081"

ARG APT_REPOSITORY="https://artifacts.aws.cloud.mov.ai/repository"

### Environment config
Expand Down Expand Up @@ -37,36 +36,28 @@ COPY --chown=movai:movai files/deploy.sh /usr/local/bin/deploy.sh
COPY files/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY files/movai-entrypoint.sh /usr/local/bin/movai-entrypoint.sh

COPY files/packages.bash /tmp/packages.bash
COPY $ROS_VERSION/packages.apt /tmp/packages.apt

# Install requirements for ppa certificates registration
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \

Check failure on line 44 in noetic/Dockerfile-rosfree

View workflow job for this annotation

GitHub Actions / movai-base-focal / build_deploy

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 44 in noetic/Dockerfile-rosfree

View workflow job for this annotation

GitHub Actions / movai-base-focal / build_deploy

DL3009 info: Delete the apt-get lists after installing something

Check failure on line 44 in noetic/Dockerfile-rosfree

View workflow job for this annotation

GitHub Actions / movai-base-focal / build_deploy

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 44 in noetic/Dockerfile-rosfree

View workflow job for this annotation

GitHub Actions / movai-base-focal / build_deploy

DL3009 info: Delete the apt-get lists after installing something
apt-get update &&\
apt-get install -y curl gnupg ca-certificates --no-install-recommends

COPY files/apt/movai-ubuntu-archive-proxy.list /etc/apt/sources.list.d/movai-ubuntu-archive-proxy.list
COPY files/apt/movai-ubuntu-ports-proxy.list /etc/apt/sources.list.d/movai-ubuntu-ports-proxy.list
COPY files/apt/movai-ubuntu-security-proxy.list /etc/apt/sources.list.d/movai-ubuntu-security-proxy.list


# Install base packages
COPY files/packages.bash /tmp/packages.bash
COPY $ROS_VERSION/packages.apt /tmp/packages.apt
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt update &&\
apt-get install -y curl gnupg --no-install-recommends &&\
mv /etc/apt/sources.list /etc/apt/sources.list.bck &&\
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bck &&\
touch /etc/apt/sources.list &&\
curl -fsSL $APT_REPOSITORY/movai-applications/gpg | apt-key add - &&\
if [ "$(uname -m)" = "x86_64" ] ; then rm /etc/apt/sources.list.d/movai-ubuntu-ports-proxy.list ; fi &&\
if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "armv7l" ] ; then rm /etc/apt/sources.list.d/movai-ubuntu-archive* && rm /etc/apt/sources.list.d/movai-ubuntu-security* ; fi &&\
apt-get update && apt-get upgrade -y &&\
/usr/local/bin/install-packages.sh &&\
# Clean apt
apt-get autoremove -y && \
apt-get clean -y > /dev/null && \
# Clean pip temp files
/usr/bin/python3 -m pip install pyclean && \
# Remove __pycache__ folders
/usr/bin/python3 -m pyclean /usr/ /opt/ && \
# Remove apt cache and tmp files
python3 -c "import glob, shutil, os; \
[shutil.rmtree(d) for pattern in ['/var/lib/apt/lists/*', '/tmp/*', '/var/cache/apt/*'] \
for d in glob.glob(pattern) if os.path.isdir(d)]" && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/* &&\
rm -rf /var/log/*

Expand All @@ -76,4 +67,4 @@ RUN /usr/local/bin/user-provision.sh

SHELL ["/bin/bash", "-c"]
WORKDIR ${APP_PATH}
ENTRYPOINT [ "docker-entrypoint.sh" ]
ENTRYPOINT [ "docker-entrypoint.sh" ]

0 comments on commit 9392c11

Please sign in to comment.