forked from kholia/chisel-examples
/
base_image_openssl.dockerfile
28 lines (23 loc) · 1.35 KB
/
base_image_openssl.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM chisel:22.04 as installer
# This Dockerfile is building from the "chisel:22.04" image, which has been built using the "../Dockerfile" file with the argument "UBUNTU_RELEASE=22.04"
# ``` docker build .. --build-arg UBUNTU_RELEASE=22.04 -t chisel:22.04 ```
WORKDIR /staging
# Sets the working directory to "/staging"
RUN ["chisel", "cut", "--root", "/staging", \
"base-files_base", \
"base-files_release-info", \
"ca-certificates_data", \
"libc6_libs", \
"libssl3_libs", \
"openssl_config" ]
# Runs the "chisel" command with the "cut" option, setting the root directory to "/staging" and cutting the specified files/directories
FROM scratch
# Starts a new build stage from the "scratch" image, which is an empty image with no files or libraries
COPY --from=installer [ "/staging/", "/" ]
# Copies the files from the previous build stage ("installer") at the "/staging" directory to the root directory ("/") of the new image
# *** USAGE (run from the host, not from the DevContainer) ***
#
# This provides the usage instructions for building the "chiselled-base:22.04" image from this Dockerfile:
# 1. Build the "chisel:22.04" image using the "../Dockerfile" file with the argument "UBUNTU_RELEASE=22.04"
# ``` docker build .. --build-arg UBUNTU_RELEASE=22.04 -t chisel:22.04 ```
# 2. Build the "chiselled-base:22.04" image using this Dockerfile