Skip to content

Commit 95995a9

Browse files
committed
add produciton deployment dockerfile
1 parent 7ff0bbf commit 95995a9

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

‎Dockerfile.okd‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Dockerfile for AliceTraINT
2+
FROM golang:1.22-alpine AS builder
3+
4+
RUN apk add --no-cache git build-base curl make
5+
6+
WORKDIR /app
7+
8+
COPY go.mod go.sum ./
9+
10+
RUN go mod download
11+
12+
# install tailwind CLI
13+
ENV TAILWIND_VERSION=v3.4.10
14+
RUN curl -L "https://github.com/tailwindlabs/tailwindcss/releases/download/$TAILWIND_VERSION/tailwindcss-linux-x64" -o /usr/local/bin/tailwindcss
15+
RUN chmod +x /usr/local/bin/tailwindcss
16+
17+
COPY . .
18+
19+
# generate css using tailwind CLI
20+
RUN make css
21+
22+
RUN CGO_ENABLED=0 GOOS=linux go build -o AliceTraINT ./cmd/AliceTraINT
23+
24+
FROM python:3.12-alpine
25+
26+
RUN apk add --no-cache ca-certificates \
27+
cmake \
28+
make \
29+
g++ \
30+
zlib-dev \
31+
libuuid \
32+
util-linux-dev \
33+
openssl \
34+
libcrypto3 \
35+
openssl-dev \
36+
openssl-libs-static \
37+
musl-dev \
38+
linux-headers \
39+
git \
40+
rsync
41+
RUN pip install alienpy
42+
43+
WORKDIR /root/
44+
45+
RUN mkdir ~/.globus
46+
RUN openssl pkcs12 -clcerts -nokeys -in /tmp/certs/gridCertificate.p12 -out ~/.globus/usercert.pem -password pass:
47+
RUN openssl pkcs12 -nocerts -nodes -in /tmp/certs/gridCertificate.p12 -out ~/.globus/userkey.pem -password pass:
48+
RUN chmod 0400 ~/.globus/userkey.pem
49+
ENV CCDB_SSL_CERT_PATH=/root/.globus/usercert.pem
50+
ENV CCDB_SSL_KEY_PATH=/root/.globus/userkey.pem
51+
52+
WORKDIR /app
53+
RUN alien.py getCAcerts
54+
# for some reason first execution of ls is returning nil - from second and on it works as expected
55+
RUN alien_ls /
56+
57+
COPY --from=builder /app/.env /app/AliceTraINT ./
58+
COPY --from=builder /app/web ./web
59+
COPY --from=builder /app/static/ ./static/
60+
61+
EXPOSE 8088
62+
63+
CMD ["./AliceTraINT"]
64+

0 commit comments

Comments
 (0)