Skip to content

Commit 107f97e

Browse files
authored
Merge pull request #71 from ko-be/22.04
Add Ubuntu 22.04
2 parents 0abe6d8 + a1de29d commit 107f97e

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
suffix: ubuntu-18.04
2323
- Dockerfile: Dockerfile-ubuntu-20.04
2424
suffix: ubuntu-20.04
25+
- Dockerfile: Dockerfile-ubuntu-22.04
26+
suffix: ubuntu-22.04
2527
- Dockerfile: Dockerfile-alpine
2628
suffix: alpine
2729
- Dockerfile: Dockerfile-centos-7

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ before_install:
77
# install goss
88
- curl -L https://goss.rocks/install | sudo sh
99

10+
os: linux
11+
12+
dist: focal
13+
1014
arch:
1115
- amd64
12-
- arm64
16+
- arm64-graviton2
1317

1418
script:
1519
- docker build -f Dockerfile-alpine .
1620
- docker build -f Dockerfile-centos-7 .
1721
- docker build -f Dockerfile-ubuntu-18.04 .
1822
- docker build -f Dockerfile-ubuntu-20.04 .
23+
- docker build -f Dockerfile-ubuntu-22.04 .
1924
- ./test.sh

Dockerfile-ubuntu-22.04

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
FROM ubuntu:22.04 as base
2+
3+
### Stage 1 - add/remove packages ###
4+
5+
# Ensure scripts are available for use in next command
6+
COPY ./container/root/scripts/* /scripts/
7+
COPY ./container/root/usr/local/bin/* /usr/local/bin/
8+
9+
# - Symlink variant-specific scripts to default location
10+
# - Upgrade base security packages, then clean packaging leftover
11+
# - Add S6 for zombie reaping, boot-time coordination, signal transformation/distribution: @see https://github.com/just-containers/s6-overlay#known-issues-and-workarounds
12+
# - Add goss for local, serverspec-like testing
13+
RUN /bin/bash -e /scripts/ubuntu_apt_config.sh && \
14+
/bin/bash -e /scripts/ubuntu_apt_cleanmode.sh && \
15+
ln -s /scripts/clean_ubuntu.sh /clean.sh && \
16+
ln -s /scripts/security_updates_ubuntu.sh /security_updates.sh && \
17+
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
18+
/bin/bash -e /security_updates.sh && \
19+
apt-get install -yqq \
20+
curl \
21+
gpg \
22+
apt-transport-https \
23+
&& \
24+
/bin/bash -e /scripts/install_s6.sh && \
25+
/bin/bash -e /scripts/install_goss.sh && \
26+
apt-get remove --purge -yq \
27+
curl \
28+
gpg \
29+
&& \
30+
/bin/bash -e /clean.sh
31+
32+
# Overlay the root filesystem from this repo
33+
COPY ./container/root /
34+
35+
36+
### Stage 2 --- collapse layers ###
37+
38+
FROM scratch
39+
COPY --from=base / .
40+
41+
# Use in multi-phase builds, when an init process requests for the container to gracefully exit, so that it may be committed
42+
# Used with alternative CMD (worker.sh), leverages supervisor to maintain long-running processes
43+
ENV SIGNAL_BUILD_STOP=99 \
44+
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
45+
S6_KILL_FINISH_MAXTIME=5000 \
46+
S6_KILL_GRACETIME=3000
47+
48+
RUN goss -g goss.base.yaml validate
49+
50+
# NOTE: intentionally NOT using s6 init as the entrypoint
51+
# This would prevent container debugging if any of those service crash
52+
CMD ["/bin/bash", "/run.sh"]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Provides base OS, security patches, and tools for quick and easy spinup.
1212

1313
* Ubuntu 18.04 LTS available, tagged as `-VERSION#-ubuntu-18.04`
1414
* Ubuntu 20.04 LTS available, tagged as `-VERSION#-ubuntu-20.04`
15+
* Ubuntu 22.04 LTS available, tagged as `-VERSION#-ubuntu-22.04`
1516
* Alpine builds available, tagged as `-alpine`
1617
* Centos 7 builds available, tagged as `-centos-7`
1718

0 commit comments

Comments
 (0)