Skip to content

Swift Tools #27

@rchatham

Description

@rchatham

Hi,

I have been trouble getting the docker build command to work. I am repeatedly receiving the error /root/vapor: error: package at '/root/vapor' requires a minimum Swift tools version of 5.0.0 (currently 4.2.0). I upgraded to the latest Xcode 11 Beta and selected the latest tools using sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer. Running swiftenv I can see that the selected swift tools are 5.0 at the repository.

Any help would be greatly appreciated!

I ran the following command replacing the JWT_PUBLIC and JWT_SECRET values with generated rsa public and private keys,

docker build . -t users
docker run -e JWT_PUBLIC='n-value-from-jwt' \
-e DATABASE_HOSTNAME='localhost' \
-e DATABASE_USER='users_service' \
-e DATABASE_PASSWORD='users_service' \
-e DATABASE_DB='users_service' \
-e JWT_SECRET='d-value-from-jwt' -p 8080:8080 users

Here are the logs from running the getting started command.

Sending build context to Docker daemon  120.8MB
Step 1/25 : FROM swift:4.2
 ---> ce1fe933c297
Step 2/25 : ARG ENVIRONMENT
 ---> Using cache
 ---> 52c9704beb14
Step 3/25 : ENV ENVIRONMENT ${ENVIRONMENT:-production}
 ---> Using cache
 ---> 525c39d43606
Step 4/25 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 6a1dcf17f6cf
Step 5/25 : ENV TZ=Europe/Berlin
 ---> Using cache
 ---> be3ab5a1e6fc
Step 6/25 : ENV TERM xterm
 ---> Using cache
 ---> 509a1f6fd08d
Step 7/25 : RUN apt-get update && apt-get -y install wget lsb-release apt-transport-https
 ---> Using cache
 ---> 1119f8522a86
Step 8/25 : RUN wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | apt-key add -
 ---> Using cache
 ---> 7025dc9a6736
Step 9/25 : RUN echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/vapor.list
 ---> Using cache
 ---> 4f2e17d46633
Step 10/25 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 ---> Using cache
 ---> f2a799ef60eb
Step 11/25 : USER root
 ---> Using cache
 ---> 150ff5afb19f
Step 12/25 : RUN apt-get update && apt-get install
 ---> Using cache
 ---> e6fea8edc4c2
Step 13/25 : RUN mkdir /root/vapor
 ---> Using cache
 ---> c0b471d1d3d0
Step 14/25 : ADD . /root/vapor
 ---> Using cache
 ---> 48103aec8142
Step 15/25 : WORKDIR /root/vapor
 ---> Using cache
 ---> a0af880d3b4f
Step 16/25 : RUN cd /root/vapor && rm -rf .build
 ---> Using cache
 ---> 8c070f77c9a0
Step 17/25 : RUN swift package update
 ---> Running in d7df9175b541
/root/vapor: error: package at '/root/vapor' requires a minimum Swift tools version of 5.0.0 (currently 4.2.0)
The command '/bin/sh -c swift package update' returned a non-zero code: 1
Unable to find image 'users:latest' locally
docker: Error response from daemon: pull access denied for users, repository does not exist or may require 'docker login'.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions