Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: install required usg dependencies #446

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ RUN apt-get update \
# Uses python3.8 by default
RUN apt install -y python3 python3-pip

# Deps for container hardening
RUN ln -sf "/usr/share/zoneinfo/$SYSTEM_TIMEZONE" /etc/localtime
COPY docker/ua-attach-config.sh .
RUN --mount=type=secret,id=UA_TOKEN ./ua-attach-config.sh && \
ua attach --attach-config ua-attach-config.yaml && \
rm ua-attach-config.yaml
RUN apt-get -y -q install usg

# Install and setup en_US.UTF-8 locale
# This is necessary so that output from node/ruby/python
# won't break or have weird indecipherable characters
Expand Down Expand Up @@ -124,11 +132,5 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
COPY ./src ./

# Container Hardening
RUN ln -sf "/usr/share/zoneinfo/$SYSTEM_TIMEZONE" /etc/localtime
COPY docker/ua-attach-config.sh .
RUN --mount=type=secret,id=UA_TOKEN ./ua-attach-config.sh && \
ua attach --attach-config ua-attach-config.yaml && \
rm ua-attach-config.yaml
RUN apt-get -y -q install usg
RUN usg fix cis_level1_server
RUN apt-get purge --auto-remove -y ubuntu-advantage-tools
Loading