First commit
This commit is contained in:
commit
b84e7dcac2
3 changed files with 58 additions and 0 deletions
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
FROM debian:latest
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-venv \
|
||||
python3-pip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
RUN python3 -m venv /opt/venv
|
||||
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --upgrade pip \
|
||||
&& pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["echo", "Y para el Rojo, por favor, un minuto de silencio..."]
|
||||
30
Jenkinsfile
vendored
Normal file
30
Jenkinsfile
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
IMAGE_NAME = 'test-img'
|
||||
DOCKERHUB_USER = 'ramonvasquezliesa'
|
||||
DOCKERHUB_REPO = "${DOCKERHUB_USER}/${IMAGE_NAME}"
|
||||
TAG = 'latest'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build Image') {
|
||||
steps {
|
||||
script {
|
||||
docker.build("${DOCKERHUB_REPO}:${TAG}", '-f Dockerfile .')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Push Image') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('https://index.docker.io/v1/', 'dockerhub-credentials') {
|
||||
docker.image("${DOCKERHUB_REPO}:${TAG}").push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
6
requirements.txt
Normal file
6
requirements.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
copier
|
||||
invoke
|
||||
numpy
|
||||
pandas
|
||||
psycopg
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue