8000 Add Ubuntu 22.04 by ko-be · Pull Request #71 · behance/docker-base · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Ubuntu 22.04 #71

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

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
suffix: ubuntu-18.04
- Dockerfile: Dockerfile-ubuntu-20.04
suffix: ubuntu-20.04
- Dockerfile: Dockerfile-ubuntu-22.04
suffix: ubuntu-22.04
- Dockerfile: Dockerfile-alpine
suffix: alpine
- Dockerfile: Dockerfile-centos-7
Expand Down
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ before_install:
# install goss
- curl -L https://goss.rocks/install | sudo sh

os: linux

dist: focal

arch:
- amd64
- arm64
- arm64-graviton2

script:
- docker build -f Dockerfile-alpine .
- docker build -f Dockerfile-centos-7 .
- docker build -f Dockerfile-ubuntu-18.04 .
- docker build -f Dockerfile-ubuntu-20.04 .
- docker build -f Dockerfile-ubuntu-22.04 .
- ./test.sh
52 changes: 52 additions & 0 deletions Dockerfile-ubuntu-22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM ubuntu:22.04 as base

### Stage 1 - add/remove packages ###

# Ensure scripts are available for use in next command
COPY ./container/root/scripts/* /scripts/
COPY ./container/root/usr/local/bin/* /usr/local/bin/

# - Symlink variant-specific scripts to default location
# - Upgrade base security packages, then clean packaging leftover
# - Add S6 for zombie reaping, boot-time coordination, signal transformation/distribution: @see https://github.com/just-containers/s6-overlay#known-issues-and-workarounds
# - Add goss for local, serverspec-like testing
RUN /bin/bash -e /scripts/ubuntu_apt_config.sh && \
/bin/bash -e /scripts/ubuntu_apt_cleanmode.sh && \
ln -s /scripts/clean_ubuntu.sh /clean.sh && \
ln -s /scripts/security_updates_ubuntu.sh /security_updates.sh && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
/bin/bash -e /security_updates.sh && \
apt-get install -yqq \
curl \
gpg \
apt-transport-https \
&& \
/bin/bash -e /scripts/install_s6.sh && \
/bin/bash -e /scripts/install_goss.sh && \
apt-get remove --purge -yq \
curl \
gpg \
&& \
/bin/bash -e /clean.sh

# Overlay the root filesystem from this repo
COPY ./container/root /


### Stage 2 --- collapse layers ###

FROM scratch
COPY --from=base / .

# Use in multi-phase builds, when an init process requests for the container to gracefully exit, so that it may be committed
# Used with alternative CMD (worker.sh), leverages supervisor to maintain long-running processes
ENV SIGNAL_BUILD_STOP=99 \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_KILL_FINISH_MAXTIME=5000 \
S6_KILL_GRACETIME=3000

RUN goss -g goss.base.yaml validate

# NOTE: intentionally NOT using s6 init as the entrypoint
# This would prevent container debugging if any of those service crash
CMD ["/bin/bash", "/run.sh"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Provides base OS, security patches, and tools for quick and easy spinup.

* Ubuntu 18.04 LTS available, tagged as `-VERSION#-ubuntu-18.04`
* Ubuntu 20.04 LTS available, tagged as `-VERSION#-ubuntu-20.04`
* Ubuntu 22.04 LTS available, tagged as `-VERSION#-ubuntu-22.04`
* Alpine builds available, tagged as `-alpine`
* Centos 7 builds available, tagged as `-centos-7`

Expand Down
0