Skip to content

Commit

Permalink
Create Dockerfile with base as amazonlinux (#130)
Browse files Browse the repository at this point in the history
* Create Dockerfile_base_amazonlinux

This dockerfile will be used to create daemon image with the amazonlinux base image

* Rename Dockerfile_base_amazonlinux to Dockerfile.amazonlinux
  • Loading branch information
srprash authored Apr 16, 2021
1 parent e4558e8 commit e109554
Showing 1 changed file with 21 additions and 0 deletions.
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"]

0 comments on commit e109554

Please sign in to comment.