Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Web Hosting EKS - PHP 8.4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OTDI Web Hosting
Container Images
Web Hosting EKS - PHP 8.4
Commits
7c1df6dc
Commit
7c1df6dc
authored
1 week ago
by
Edward Hicks
Browse files
Options
Downloads
Patches
Plain Diff
convert to multistage build
parent
6adeb33a
Loading
Loading
No related merge requests found
Pipeline
#209274
passed
5 hours ago
Stage: awsauth
Stage: build
Stage: test
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-18
1 addition, 18 deletions
.gitlab-ci.yml
Dockerfile
+7
-1
7 additions, 1 deletion
Dockerfile
Makefile
+1
-1
1 addition, 1 deletion
Makefile
with
9 additions
and
20 deletions
.gitlab-ci.yml
+
1
−
18
View file @
7c1df6dc
...
...
@@ -11,8 +11,6 @@ stages:
awsauth
:
stage
:
awsauth
image
:
registry.containers.it.osu.edu/cache/gitlab-org/cloud-deploy/aws-base:latest
rules
:
-
!reference
[
.default_rules
,
rules
]
script
:
-
if [ "${AWS_ACCESS_KEY_ID}" = "" ]; then echo "Missing AWS_ACCESS_KEY_ID"; exit 1; fi
-
if [ "${AWS_SECRET_ACCESS_KEY}" = "" ]; then echo "Missing AWS_SECRET_ACCESS_KEY"; exit 1; fi
...
...
@@ -35,8 +33,6 @@ build:
needs
:
-
job
:
awsauth
artifacts
:
true
rules
:
-
!reference
[
.default_rules
,
rules
]
script
:
-
if [ $CI_COMMIT_REF_SLUG = "master" -o $CI_COMMIT_REF_SLUG = "main" ]; then TAG="latest"; fi
-
if [ "$AWS_ECR_TOKEN" != "" ]; then ECRARG="--destination ${AWS_ECR_REGISTRY}/${CI_PROJECT_NAME}:${TAG}"; fi
...
...
@@ -59,7 +55,7 @@ build:
" > /kaniko/.docker/config.json
-
|
/kaniko/executor \
--single-snapshot \
--single-snapshot
--target main
\
--context "${CI_PROJECT_DIR}" \
--git "branch=${CI_COMMIT_REF_SLUG},depth=1,single-branch=true,recurse-submodules=true,shallow-submodules=true" \
--dockerfile "${CI_PROJECT_DIR}/Dockerfile" \
...
...
@@ -71,21 +67,8 @@ build:
dotenv
:
build.env
container_scanning
:
rules
:
-
!reference
[
.default_rules
,
rules
]
dependencies
:
-
build
include
:
-
template
:
Security/Container-Scanning.gitlab-ci.yml
.default_rules
:
rules
:
# - changes:
# - "*.md"
# - ".*ignore"
# - Makefile
# - runlocal.sh
# - merge-from-base.sh
# when: never
-
when
:
always
This diff is collapsed.
Click to expand it.
Dockerfile
+
7
−
1
View file @
7c1df6dc
FROM
code.osu.edu:5000/wh/containerimages/wheks-base
FROM
code.osu.edu:5000/wh/containerimages/wheks-base
AS
main
LABEL
maintainer="E. Stuart Hicks <hicks.367@osu.edu>"
USER
root
...
...
@@ -121,3 +121,9 @@ RUN mv -v /usr/sbin/suexec /usr/sbin/suexec.hide_me_or_i_confuse_mod_fcgid
WORKDIR
/var/www
USER
apache
# Final squash & setup
FROM
scratch
COPY
--from=main / /
WORKDIR
/var/www
USER
apache
This diff is collapsed.
Click to expand it.
Makefile
+
1
−
1
View file @
7c1df6dc
IMAGE
=
wheks-php84:fcgid
build
:
DOCKER_BUILDKIT
=
0
docker build
--platform
linux/amd64
--squash
-t
$(
IMAGE
)
.
docker build
--platform
linux/amd64
-t
$(
IMAGE
)
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment