forked from jicg/liteblog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
,
- Loading branch information
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
#FROM scratch as final | ||
FROM alpine as alpine_sqlite | ||
RUN apk --update upgrade \ | ||
&& apk add sqlite | ||
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 | ||
RUN rm -rf /var/cache/apk/* | ||
|
||
FROM golang:latest as builder | ||
MAINTAINER <[email protected]> | ||
WORKDIR /go/src/github.com/jicg/liteblog | ||
|
@@ -6,9 +13,9 @@ COPY . . | |
#ENV CGO_ENABLED=0 | ||
#RUN godep go build -installsuffix cgo -ldflags="-w -s" | ||
RUN godep go build -ldflags="-w -s" | ||
#FROM scratch as final | ||
#FROM alpine as final | ||
FROM debian:latest as final | ||
|
||
FROM alpine_sqlite as final | ||
#FROM debian:latest as final | ||
MAINTAINER <[email protected]> | ||
|
||
#COPY --from=builder /etc/passwd /etc/passwd | ||
|
@@ -21,9 +28,11 @@ VOLUME /app/data | |
VOLUME /app/assert | ||
EXPOSE 8080 | ||
WORKDIR /app | ||
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& echo 'Asia/Shanghai' >/etc/timezone \ | ||
|
||
|
||
#RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
#&& echo 'Asia/Shanghai' >/etc/timezone \ | ||
#&& chmod +x start.sh | ||
&& chmod +x liteblog | ||
RUN chmod +x liteblog | ||
ENTRYPOINT ["/app/liteblog"] | ||
CMD [] |