-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #321 from lsst-sqre/tickets/DM-42182
DM-42182: Simplify the Docker build
- Loading branch information
Showing
3 changed files
with
29 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# This script updates packages in the base Docker image that's used by both the | ||
# build and runtime images, and gives us a place to install additional | ||
# This script updates packages in the base Docker image that's used by both | ||
# the build and runtime images, and gives us a place to install additional | ||
# system-level packages with apt-get. | ||
# | ||
# Based on the blog post: | ||
# https://pythonspeed.com/articles/system-packages-docker/ | ||
|
||
# Bash "strict mode", to help catch problems and bugs in the shell | ||
# script. Every bash script you write should include this. See | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ for | ||
# details. | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ for details. | ||
set -euo pipefail | ||
|
||
# Display each command as it's run. | ||
set -x | ||
|
||
# Tell apt-get we're never going to be able to give manual | ||
# feedback: | ||
# Tell apt-get we're never going to be able to give manual feedback. | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
# Update the package listing, so we know what packages exist: | ||
# Update the package listing, so we know what packages exist. | ||
apt-get update | ||
|
||
# Install security updates: | ||
# Install security updates. | ||
apt-get -y upgrade | ||
|
||
# Example of installing a new package, without unnecessary packages: | ||
apt-get -y install --no-install-recommends git | ||
|
||
# Delete cached files we don't need anymore: | ||
# Delete cached files we don't need anymore. | ||
apt-get clean | ||
rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters