Run Kitura Docker Image causes libmysqlclient.so.18 Error

Run Kitura Docker Image causes libmysqlclient.so.18 Error

Content Index :

Run Kitura Docker Image causes libmysqlclient.so.18 Error
Tag : swift , By : SachinJadhav
Date : January 12 2021, 09:11 PM

I hope this helps you . I was able to update and enhance my dockerfile this is now running smoothly and also can be used for CI and CD tasks.

    FROM ibmcom/swift-ubuntu-runtime:latest
    ##FROM ibmcom/swift-ubuntu-runtime:5.0.1

    LABEL maintainer="IBM Swift Engineering at IBM Cloud"
    LABEL Description="Template Dockerfile that extends the ibmcom/swift-ubuntu-runtime image."

    # We can replace this port with what the user wants
    EXPOSE 8080

    # Default user if not provided
    ARG bx_dev_user=root
    ARG bx_dev_userid=1000

    # Install system level packages
    RUN apt-get update && apt-get dist-upgrade -y
    RUN apt-get update && apt-get install -y sudo libmysqlclient-dev

    # Add utils files
    ADD https://raw.githubusercontent.com/IBM-Swift/swift-ubuntu-docker/master/utils/run-utils.sh /swift-utils/run-utils.sh
    ADD https://raw.githubusercontent.com/IBM-Swift/swift-ubuntu-docker/master/utils/common-utils.sh /swift-utils/common-utils.sh
    RUN chmod -R 555 /swift-utils

    # Create user if not root
    RUN if [ $bx_dev_user != "root" ]; then useradd -ms /bin/bash -u $bx_dev_userid $bx_dev_user; fi

    # Bundle application source & binaries
    COPY ./.build /swift-project/.build

    # Command to start Swift application
    CMD [ "sh", "-c", "cd /swift-project && .build/release/Beautylivery_Server_New" ] 

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Use Docker + Kitura, but not on a Mac

Tag : docker , By : Jet Thompson
Date : March 29 2020, 07:55 AM
around this issue Your options are limited. First of all Swift is only certified at this moment on Ubuntu. So the host you want to develop on either must run Ubuntu or alternatively must run Docker under which you can run Ubuntu.
In theory you can also compile swift on your target host. I did this for an older version of Swift once for Debain (Jessie) and although I managed to get it compiled it was certainly not stable. Things may have improved since then, I haven't checked that.
SwiftDocker2 ()
    name=`perl -e 'open IN, "</usr/share/dict/words";rand($.) \
        < 1 && ($n=$_) while <IN>;print $n'`;
    docker run -i -t --name=${name} -h ${name} --log-driver=json-file \
        -w /project -v $(pwd):/project -p 9000:9000 ibmcom/swift-ubuntu /bin/bash;
    echo "Created image ${name}";
    echo "Stopping image";
    docker stop ${name};
    echo "Removing image";
    docker rm ${name}
BUILD_LINUX = "./.build-linux"
BUILD_MACOS = "./.build-macos"
UNAME = $(shell uname)

ifeq (${UNAME}, Darwin)

    @swift package --build-path ${BUILD_PATH} -Xlinker -L/usr/local/lib generate-xcodeproj

    rm -f Package.pins
    swift build --build-path ${BUILD_PATH} -Xlinker "-L/usr/local/lib"

Docker Build Kitura Sqift Container - Shim.h mysql.h file not found

Tag : docker , By : Webtoad
Date : December 31 2020, 02:31 AM
To fix the issue you can do The problem here is that the ibmcom/swift-ubuntu:5.0.2 image is built on top of Ubuntu 14.04. The version of libmysqlclient-dev supplied with 14.04 does not include the pkg-config information that allows the Swift compiler to find the headers without help.
There are two solutions to this problem:

I get error Unable to find docker image locally; However I can run the image using docker run command

Tag : r , By : Tony Z
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , The problem was that the VM cluster instances created did not have the .docker/config.json file in them. Hence the docker image could not be pulled by the VMs, resulting in the error. One way to resolve this is to SSH into the VMs and run the docker-credential-gcr configure-docker command. This generates the .docker/config.json folder/file successfully allowing the VMs to pull the images.

Can't create a docker image for COPY failed: stat /var/lib/docker/tmp/docker-builder error

Tag : python , By : Myatus
Date : March 29 2020, 07:55 AM
it helps some times I want to create a docker image. This is my work directory: Dockerfile.in test.json test.py , You should put those files into the same directory with Dockerfile.

Library not loaded: @rpath/libmysqlclient.21.dylib Reason: image not found Django migrate error using mysqlclient DB dri

Tag : python , By : Vodkat
Date : March 29 2020, 07:55 AM
around this issue While changing to a MySQL database from the default SQLite one that Django uses by default, I ran into this tricky error while trying to run python manage.py migrate --database mysql: , Just create a symbolic link in /usr/local/lib
sudo ln -s /usr/local/mysql/lib/libmysqlclient.21.dylib /usr/local/lib/libmysqlclient.21.dylib
Related Posts Related QUESTIONS :
  • Type of expression is ambiguous without more context in Xcode 11
  • How to setup Horizontal UICollectionView with paging, but items per page arrange from left to right & top to bottom
  • Why does this method with an optional parameter not override the base class method?
  • Implement a collection view SwiftUI
  • RealityKit – Set text programmatically of an Entity of Reality Composer
  • How to open file dialog with SwiftUI on platform "UIKit for Mac"?
  • Sliding one SwiftUI view out from underneath another
  • how to set a IBAction action on a button
  • Is 'window' not an identifier in Swift iOS Development?
  • How to Sort a string date array
  • Can anyone explain Swift Combine's Subject.eraseToAnySubject() method and where it should be used?
  • Is there a method to blur a background in SwiftUI?
  • Getting RSA private key's n and d using Swift
  • Code=50 “No such payment_intent” when confirm payment intent for stripe
  • xcodebuild -create-framework error: unable to read the file
  • Conditional rendering with optionals in SwiftUI
  • Upgrading WKInterfaceController classes to new SwiftUI struct/View
  • TabbedView using SwiftUI in Xcode11Beta (11M336w)
  • IndexSet referring to index of the section instead of the row
  • Swift UI - How to make Image Grids?
  • Enum as a key for dictionary
  • SwiftUI - NavigationView Error message - Argument passed to call that takes no arguments
  • Does guard make a copy of variables in swift
  • Error "Argument labels '(min:, max:)' do not match any available overloads"
  • Struct Memberwise Initialization - Omitting values for properties that have defaults
  • How to get RGB components from Color SwiftUI
  • Why do Singleton's capture an instance of themselves?
  • Firebase Rules - Restrict to a specific user or only if authorized?
  • Is there a way I can combine a GeoFireStore query with a normal Firestore query?
  • SwiftUI TextField Simple Example not working
  • Initializers may only be declared within a type
  • memory leak with swift due to reference cycle
  • addUIInterruptionMonitor is not getting called on macOS
  • Show user location on map SwiftUI
  • What is the recommended logic to use when checking authenticity in Auto Renewal Subscriptions
  • Unable to deploy Swift Vapor app in gCloud
  • Project Euler Problem #2 in Swift Sum of Fibonacci Numbers Below 4 Million
  • Why return nil tableViewCell for UITableViewDiffableDataSource cellProvider param?
  • Xcode 11 beta and Mac OS Mojave: when I try to create a new project and/or open existing one it closes down with error
  • In Swift, is it a good practice to declare variables with a value assigned?
  • Deriving binding from existing SwiftUI @States
  • Advice for updating old Swift Project
  • Swift AVAssetWriter Record Video with Mic Audio AND Device Audio into a Video with ONE Audio Track AVAssetTrack
  • SwiftUI dismiss modal
  • VStack not filling screen width in ScrollView, does fill in List
  • How to detect a tap gesture location in SwiftUI?
  • Using Xcode/Swift, how can I use an SF Symbol as a tab bar icon in assets? The asset field won't accept the .svg file
  • How to fix Xcode error "Segmentation fault: 11" after adding didSet to @State var
  • Views compressed by other views in SwiftUI VStack and List
  • Why is the modifier .navigationBarTitle not applied to NavigationView?
  • "Cannot Preview in this file - Failed to launch [App Name]"
  • Get the current position of ScrollView in SwiftUI?
  • How to use buildExpression in Swift 5.2 Function Builders?
  • Where do I put a return in a function?
  • SwiftUI - Is there a popViewController equivalent in SwiftUI?
  • How to remove "row" separators from a List in SwiftUI?
  • Understanding @Binding in SwiftUI
  • Convert Realm list of Strings to Array of Strings in Swift
  • Are the #if DEBUG statements really needed for previews in SwiftUI to remove it in a release build?
  • WkWebView in MacOS remains blank on local or remote content
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com