Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile_base_amazonlinux #130

Merged
merged 3 commits into from
Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile.amazonlinux
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build stage
FROM --platform=$BUILDPLATFORM golang:1.15-alpine AS build-env
ARG TARGETPLATFORM

RUN apk update && apk add ca-certificates

WORKDIR /workspace

COPY . .

RUN adduser -D -u 10001 xray
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
RUN Tool/src/build-in-docker.sh

FROM amazonlinux
COPY --from=build-env /workspace/xray .
COPY --from=build-env /etc/passwd /etc/passwd
COPY --from=build-env /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY pkg/cfg.yaml /etc/amazon/xray/cfg.yaml
USER xray
ENTRYPOINT ["/xray"]