File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
- FROM debian:stretch -slim
1
+ FROM debian:bullseye -slim as build
2
2
3
3
LABEL maintainer=
"[email protected] "
4
- LABEL version="1 .0"
5
- LABEL description="Run LinuxFr image caching service for LinuxFr.org Ruby on Rails website "
4
+ LABEL version="2 .0"
5
+ LABEL description="Run LinuxFr image caching service for LinuxFr.org"
6
6
7
+ ENV GOPATH=/linuxfr-img
7
8
WORKDIR /linuxfr-img
8
9
9
- # Install dependencies
10
+ # Build linuxfr-img
10
11
RUN apt-get update \
11
12
&& apt-get install -y --no-install-recommends \
12
13
golang git ca-certificates \
13
- && apt-get clean
14
+ && apt-get clean \
15
+ && go get -u github.com/linuxfrorg/img-LinuxFr.org
14
16
15
- # Install linuxfr-img
16
- ENV GOPATH=/linuxfr-img/go
17
- ENV PATH=${PATH}:/linuxfr-img/go/bin
18
- RUN go get -u github.com/linuxfrorg/img-LinuxFr.org
17
+ FROM debian:bullseye-slim as deploy
18
+
19
+ WORKDIR /linuxfr-img
20
+
21
+ COPY --from=build /linuxfr-img/bin/img-LinuxFr.org .
19
22
20
23
EXPOSE 8000
21
24
22
- CMD ["sh" , "-c" , "exec img-LinuxFr.org -a 0.0.0.0:8000 -r \" ${REDIS_URL##redis://}\" " ]
25
+ CMD ["sh" , "-c" , "exec ./ img-LinuxFr.org -a 0.0.0.0:8000 -r \" ${REDIS_URL##redis://}\" " ]
You can’t perform that action at this time.
0 commit comments