-
Notifications
You must be signed in to change notification settings - Fork 59
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
Migrate ds-code container from ubi to rhel-els #587
Open
azatsarynnyy
wants to merge
1
commit into
devspaces-3-rhel-8
Choose a base branch
from
code-els
base: devspaces-3-rhel-8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ | |
############################# BUILD 1: libc-ubi8 ######################## | ||
######################################################################### | ||
|
||
# https://registry.access.redhat.com/ubi8/nodejs-18 | ||
FROM ubi8/nodejs-18:1-110.1716503936 as checode-linux-libc-ubi8-builder | ||
# https://registry.access.redhat.com/rhel9-6-els/rhel | ||
FROM registry.redhat.io/rhel8-6-els/rhel:8.6 as checode-linux-libc-ubi8-builder | ||
# hadolint ignore=DL3002 | ||
USER root | ||
|
||
|
@@ -224,8 +224,8 @@ RUN yarn \ | |
############################# BUILD 2: libc-ubi9 ######################## | ||
######################################################################### | ||
|
||
# https://registry.access.redhat.com/ubi9/nodejs-18 | ||
FROM ubi9/nodejs-18:1-108.1716477799 as checode-linux-libc-ubi9-builder | ||
# https://registry.access.redhat.com/rhel9-2-els/rhel | ||
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 as checode-linux-libc-ubi9-builder | ||
# hadolint ignore=DL3002 | ||
USER root | ||
|
||
|
@@ -446,8 +446,8 @@ RUN yarn \ | |
|
||
# NOTE: can't use scatch images in OSBS, because unable to start container process: exec: \"/bin/sh\": stat /bin/sh: no such file or directory | ||
# so we must rebuild machineexec binary in this build | ||
# https://registry.access.redhat.com/rhel8/go-toolset | ||
FROM rhel8/go-toolset:1.21.9-3 as machineexec-builder | ||
# https://registry.access.redhat.com/rhel9-2-els/rhel | ||
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 as machineexec-builder | ||
ENV GOPATH=/go/ | ||
# hadolint ignore=DL3002 | ||
USER root | ||
|
@@ -457,15 +457,16 @@ USER root | |
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR | ||
WORKDIR $REMOTE_SOURCES_DIR/devspaces-images-code/app/devspaces-machineexec | ||
# hadolint ignore=SC2086 | ||
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \ | ||
RUN dnf -y install golang && \ | ||
CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \ | ||
mkdir -p /rootfs/go/bin && cp -rf $REMOTE_SOURCES_DIR/devspaces-images-code/app/devspaces-machineexec/che-machine-exec /rootfs/go/bin | ||
|
||
######################################################################### | ||
############################# BUILD 4: rootfs assembly ################## | ||
######################################################################### | ||
|
||
# https://registry.access.redhat.com/ubi8 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment should be updated as well, its how the updateBaseImages script knows what to look for. |
||
FROM ubi8:8.10-901 as ubi-builder | ||
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 as ubi-builder | ||
|
||
RUN mkdir -p /mnt/rootfs/projects /mnt/rootfs/home/che /mnt/rootfs/remote/data/Machine/ | ||
# hadolint ignore=DL3033 | ||
|
@@ -496,8 +497,8 @@ RUN rm /mnt/rootfs/etc/hosts | |
############################# BUILD 5: minimal final image ############## | ||
######################################################################### | ||
|
||
# https://registry.access.redhat.com/ubi8-minimal | ||
FROM ubi8-minimal:8.10-896 | ||
# https://registry.access.redhat.com/rhel9-2-els/rhel | ||
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 | ||
COPY --from=ubi-builder /mnt/rootfs/ / | ||
ENV HOME=/home/che | ||
USER 1001 | ||
|
@@ -519,4 +520,4 @@ LABEL summary="$SUMMARY" \ | |
maintainer="Roman Nikitenko <[email protected]>" \ | ||
io.openshift.expose-services="" \ | ||
usage="" | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we provide similar changes to https://github.com/redhat-developer/devspaces-images/blob/devspaces-3-rhel-8/devspaces-code/build/dockerfiles/Dockerfile ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the sync.sh script the base Dockerfile is no longer used as a template for the brew one, so it might not be needed at all.
It also looks like the sync script already ignores the build/dockerfiles directory so we don't have to worry about these changes getting overwritten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will probably get updated automatically, but we should specify a build number, not just 8.6, for reproducibility etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows to build devspaces-code locally and it's helpful for investigation a problem(not related to brew) - as an investigation/debugging on brew is not easy process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK.