项目作者: KnowledgePending

项目描述 :
🐳 💧Simple Dev Environment for Serverside Swift using the Vapor 4 Beta
高级语言: Dockerfile
项目地址: git://github.com/KnowledgePending/Vapor4-Docker.git
创建时间: 2019-11-15T22:00:10Z
项目社区:https://github.com/KnowledgePending/Vapor4-Docker

开源协议:

下载


Vapor 4 Docker environment

Docker Pulls

With Vapor 4 comes a whole host of improvements:

  • Overhaul of Fluent
  • Support for Apple’s new Swift-Log API as the default logger
  • HTTP/2 support with SwiftNIO v2

Vapor 4 is still only in beta.
For the latest stable release see my Vapor 3 Docker image

Image details

  • Ubuntu 18.04 Bionic
  • Swift 5.1.2
  • Vapor 4 Beta

Option 1. Build Docker Image

  • From within the directory of the Dockerfile execute the following command to build the image
    1. docker build -t vapor4 .
  • To run with bash and a shared volume
    1. docker run -v <host_path>:<container_path> -ti vapor4:latest bash

    Option 2. Pull image from Docker Hub

  • Go to the repository page bryankp/vapor4
  • Pull the latest image

    1. docker pull bryankp/vapor4:latest
  • To run with bash and a shared volume

    1. docker run -v <host_path>:<container_path> -ti bryankp/vapor4:latest bash

    Further Details

  • Swift Official Docker Images
  • For troubleshooting issues see the Vapor4 Docs
  • To use the swift repl while running docker on macos the container needs to be run with the following flag —privileged