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
948be891
Commit
948be891
authored
1 week ago
by
Edward Hicks
🎱
Browse files
Options
Downloads
Patches
Plain Diff
convert to multistage build
parent
57627110
Loading
Loading
No related merge requests found
Pipeline
#208219
passed
1 week ago
Stage: awsauth
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-18
1 addition, 18 deletions
.gitlab-ci.yml
Dockerfile
+8
-1
8 additions, 1 deletion
Dockerfile
Makefile
+1
-1
1 addition, 1 deletion
Makefile
with
10 additions
and
20 deletions
.gitlab-ci.yml
+
1
−
18
View file @
948be891
...
...
@@ -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
+
8
−
1
View file @
948be891
FROM
docker.io/php:8.4-fpm
FROM
docker.io/php:8.4-fpm
AS
main
LABEL
maintainer="E. Stuart Hicks <hicks.367@osu.edu>"
# Preload users that we need consistent UIDs on
...
...
@@ -114,3 +114,10 @@ RUN rm -rf /var/lib/apt/lists/* /tmp/* /usr/local/src/*
WORKDIR
/var/www
ENTRYPOINT
[ "/usr/local/bin/docker-php-entrypoint-custom" ]
CMD
[ "/usr/local/sbin/php-fpm" ]
# Final squash & setup
FROM
scratch
COPY
--from=main / /
WORKDIR
/var/www
ENTRYPOINT
[ "/usr/local/bin/docker-php-entrypoint-custom" ]
CMD
[ "/usr/local/sbin/php-fpm" ]
This diff is collapsed.
Click to expand it.
Makefile
+
1
−
1
View file @
948be891
IMAGE
=
wheks-php84
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