Build image using docr
This commit is contained in:
parent
7a37fbd583
commit
cbbe739b82
@ -1,4 +1,6 @@
|
||||
require "commander"
|
||||
require "docr"
|
||||
require "docr/utils.cr"
|
||||
require "file_utils"
|
||||
require "uuid"
|
||||
|
||||
@ -29,8 +31,9 @@ module Faaso
|
||||
Dir.glob(arg + "/**/*").each do |file|
|
||||
FileUtils.cp(file, tmp_dir)
|
||||
end
|
||||
|
||||
# TODO: build Docker image
|
||||
docker_api = Docr::API.new(Docr::Client.new)
|
||||
docker_api.images.build(context: tmp_dir, tags: ["func"]) { }
|
||||
# TODO: push Docker image to registry
|
||||
# TODO: return image name for testing
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ RUN apk update && apk upgrade && apk add crystal shards openssl-dev zlib-dev &&
|
||||
|
||||
WORKDIR /home/app
|
||||
|
||||
COPY shard.yml *.cr .
|
||||
COPY shard.yml *.cr ./
|
||||
RUN shards install
|
||||
RUN shards build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user