diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..984948a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Base image dari docker registry lokal +FROM docker.rri.co.id/php74-fpm:latest + +# Install PHP extension tambahan yang dibutuhkan CI3 +RUN docker-php-ext-install mysqli pdo pdo_mysql + +# Copy source code aplikasi ke container +COPY . /var/www/website_csirt + +# Set permission yang benar +RUN chown -R www-data:www-data /var/www/website_csirt + +# Expose port PHP-FPM +EXPOSE 9000 + +# Jalankan PHP-FPM +CMD ["php-fpm"] diff --git a/Jenkinsfile b/Jenkinsfile index bd328d1..859d765 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { sh "docker build -t ${REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} ." } } - stage('Push Image') { + stage('Push Docker Image') { steps { withCredentials([usernamePassword(credentialsId: 'docker-credentials', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) { sh """