mirror of https://github.com/perkeep/perkeep.git
misc/docker: start of dock command
Change-Id: I758081373b5e109a32fd3e22c0b983598c5a31d8
This commit is contained in:
parent
c3853b5222
commit
2e923925db
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
Copyright 2015 The Camlistore Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Command dock builds Camlistore's various Docker images.
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"camlistore.org/pkg/osutil"
|
||||
)
|
||||
|
||||
func main() {
|
||||
camDir, err := osutil.GoPackagePath("camlistore.org")
|
||||
if err != nil {
|
||||
log.Fatalf("Error looking up camlistore.org dir: %v", err)
|
||||
}
|
||||
dockDir := filepath.Join(camDir, "misc", "docker")
|
||||
|
||||
cmd := exec.Command("docker", "build", "-t", "camlistore/go", ".")
|
||||
cmd.Dir = filepath.Join(dockDir, "go")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Fatalf("Error building camlistore/go: %v", err)
|
||||
}
|
||||
}
|
|
@ -2,7 +2,8 @@
|
|||
FROM debian:stable
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get -y upgrade
|
||||
RUN apt-get -y install curl gcc
|
||||
RUN apt-get -y --no-install-recommends install curl gcc
|
||||
RUN apt-get -y --no-install-recommends install ca-certificates libc6-dev
|
||||
|
||||
# Get Go stable release
|
||||
WORKDIR /tmp
|
||||
|
|
Loading…
Reference in New Issue