swift-utils | A collection of handy swift utils | JSON Processing library
kandi X-RAY | swift-utils Summary
kandi X-RAY | swift-utils Summary
A collection of handy swift utils
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of swift-utils
swift-utils Key Features
swift-utils Examples and Code Snippets
Community Discussions
Trending Discussions on swift-utils
QUESTION
i am trying to move my current Kitura Dev setup into a real running environment by first moving it into a Docker Container to later migrate it to a Cloud Provider.
However while trying to build my Docker Setup for Kitura i run into problems i did not find any proper solution how to fix these.
I am Building my docker Container from The instructions from this page https://www.kitura.io/docs/deploying/docker.html
But i am also using SwiftKuery with MySQL in the package.
My Docker Tools file looks like the following
...ANSWER
Answered 2019-Aug-14 at 09:04The 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:
1: You could add -Xcc -I/usr/include/mysql/
arguments to the swift build
command. Either:
- replace the command you are executing in the build container with
swift build -Xcc -I/usr/include/mysql/
, or - if you'd like to keep using the
tools-utils.sh
script, you can create a file in your project called.swift-build-linux
which contains a single line:swift build -Xcc -I/usr/include/mysql/
- this will be picked up by thetools-utils.sh
script when it runs the build.
2: You can replace your base images with FROM swift:5.0.2
(for the build image) and FROM swift:5.0.2-slim
(for the run image) - these are the official Swift-maintained images which are based on Ubuntu 18.04, and as of the Swift 5.0.2 release, provide a 'slim' image similar to ibmcom's 'runtime' image.
- Note that these images do not bundle the
libssl-dev
orlibcurl4-openssl-dev
dependencies, so you will need to include those in yourDockerfile-tools
.
QUESTION
I'm trying to run a release build of my kitura (2.7) app with mysql on the official swift-ubuntu (latest, 5.0.1) image with the following commands.
...ANSWER
Answered 2019-May-07 at 11:57The issue appears to be related to the version of Ubuntu and the resulting level of MySQL that is installed. As the base container is running Ubuntu 14.04 when MySQL installs you get version 5.5 which does not ship the required configuration for pkg-config to find the include paths needed to build your application.
I have been able to get a simple Kitura application which uses SwiftKueryMySQL to build under docker by updating my Dockerfile-tools file with two changes:
1) Update the FROM to:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install swift-utils
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page