@@ -157876,11 +157876,16 @@ class DockerRepository {
157876157876 }
157877157877 try {
157878157878 (0, logger_1.logDebugInfo)('π³ π‘ Building Docker image...');
157879- // Build the image
157879+ // Build the image with explicit tagging
157880157880 const stream = await this.docker.buildImage({
157881157881 context: this.dockerDir,
157882157882 src: ['Dockerfile', 'requirements.txt', 'main.py']
157883- }, { t: 'fastapi-app' });
157883+ }, {
157884+ t: 'fastapi-app:latest',
157885+ dockerfile: 'Dockerfile',
157886+ buildargs: {},
157887+ nocache: true
157888+ });
157884157889 const result = await new Promise((resolve, reject) => {
157885157890 this.docker.modem.followProgress(stream, (err, res) => {
157886157891 if (err) {
@@ -157898,10 +157903,25 @@ class DockerRepository {
157898157903 });
157899157904 });
157900157905 (0, logger_1.logDebugInfo)('π³ π‘ Image build result: ' + JSON.stringify(result, null, 2));
157906+ // Verify that the image exists and is properly tagged
157907+ try {
157908+ const images = await this.docker.listImages();
157909+ (0, logger_1.logDebugInfo)('π³ π‘ Images: ' + JSON.stringify(images, null, 2));
157910+ const fastapiImage = images.find(img => img.RepoTags && img.RepoTags.includes('fastapi-app:latest'));
157911+ if (!fastapiImage) {
157912+ (0, logger_1.logError)('π³ π΄ Image fastapi-app:latest not found after build');
157913+ throw new Error('Image fastapi-app:latest not found after build');
157914+ }
157915+ (0, logger_1.logDebugInfo)('π³ π’ Image exists and is properly tagged');
157916+ }
157917+ catch (error) {
157918+ (0, logger_1.logError)('π³ π΄ Error verifying image: ' + error);
157919+ throw error;
157920+ }
157901157921 (0, logger_1.logDebugInfo)('π³ π‘ Creating container...');
157902157922 // Create and start the container
157903157923 const container = await this.docker.createContainer({
157904- Image: 'fastapi-app',
157924+ Image: 'fastapi-app:latest ',
157905157925 ExposedPorts: {
157906157926 '8000/tcp': {}
157907157927 },
0 commit comments