diff --git a/Dockerfile b/Dockerfile index 32462e3..9e7d20b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,14 @@ ARG DEBIAN_FRONTEND=noninteractive USER root +WORKDIR /app +COPY . /app + RUN apt update RUN apt upgrade -y RUN apt install php php-mbstring php-xml php-pdo php-mysql php-xdebug -y RUN apt install curl -y RUN cd /tmp RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +CMD php artisan serve --host=0.0.0.0 --port=8181 +EXPOSE 8181 \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 844132e..20d9fae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,21 @@ pipeline { - agent any + agent { + dockerContainer { + image 'ubuntu:22.04' + } + } + stages { - stage('Hello') { + stage('Clone') { steps { - echo 'Hello World' + git branch: 'main', + //credentialsId: '9174b603-02b6-46bd-970d-64569bab977a', + url: 'https://github.com/buddy-works/laravel-first-steps.git' + } + } + stage('Build') { + steps { + sh 'docker build . -t dockerfile' } } }