Skip to content

Commit

Permalink
modified Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kriyanshii committed Dec 28, 2024
1 parent 7cf47b7 commit d448d47
Showing 1 changed file with 0 additions and 93 deletions.
93 changes: 0 additions & 93 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,7 @@ RUN rm -rf node_modules; \

# Stage 2: Go Builder
FROM --platform=$TARGETPLATFORM golang:1.23-alpine as go-builder
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD

=======
>>>>>>> a3117c89d56fe8d37c845c01a5df49ef99d90157
=======

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
=======

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
ARG LDFLAGS
ARG TARGETOS
ARG TARGETARCH
Expand All @@ -33,18 +22,7 @@ COPY . .

RUN go mod download && rm -rf frontend/assets
COPY --from=ui-builder /app/dist/ ./internal/frontend/assets/
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD

=======
>>>>>>> a3117c89d56fe8d37c845c01a5df49ef99d90157
=======

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
=======

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="${LDFLAGS}" -o ./bin/dagu ./cmd

# Stage 3: Final Image
Expand All @@ -54,71 +32,16 @@ ARG USER="dagu"
ARG USER_UID=1000
ARG USER_GID=$USER_UID

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
COPY --from=go-builder /app/bin/dagu /usr/local/bin/
COPY ./entrypoint.sh /entrypoint.sh

# Create user and set permissions
RUN apk update && \
apk add --no-cache su-exec shadow tzdata && \
addgroup -g ${USER_GID} ${USER} && \
adduser ${USER} -h /config -u ${USER_UID} -G ${USER} -D -s /bin/ash && \
chown -R ${USER}:${USER} /config && \
chmod +x /entrypoint.sh;

WORKDIR /config

=======
# Install common tools
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
sudo \
git \
curl \
wget \
zip \
unzip \
sudo \
tzdata \
build-essential \
jq \
python3 \
python3-pip \
openjdk-11-jdk \
nodejs \
npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

=======
>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
=======
>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
COPY --from=go-builder /app/bin/dagu /usr/local/bin/
COPY ./entrypoint.sh /entrypoint.sh

# Create user and set permissions
<<<<<<< HEAD
<<<<<<< HEAD
RUN echo "dagu ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/99-dagu \
&& chmod 440 /etc/sudoers.d/99-dagu
>>>>>>> a3117c89d56fe8d37c845c01a5df49ef99d90157
=======
=======
>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
RUN apk update && \
apk add --no-cache su-exec shadow tzdata && \
addgroup -g ${USER_GID} ${USER} && \
adduser ${USER} -h /config -u ${USER_UID} -G ${USER} -D -s /bin/ash && \
chown -R ${USER}:${USER} /config && \
chmod +x /entrypoint.sh;
<<<<<<< HEAD
>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
=======
>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))

WORKDIR /config

Expand All @@ -129,24 +52,8 @@ ENV DAGU_TZ="Etc/UTC"
ENV PUID=${USER_UID}
ENV PGID=${USER_GID}
ENV DOCKER_GID=-1
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD

EXPOSE 8080

=======
EXPOSE 8080
>>>>>>> a3117c89d56fe8d37c845c01a5df49ef99d90157
=======

EXPOSE 8080

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
=======

EXPOSE 8080

>>>>>>> parent of a3117c8 (docker-image: Add handy tools to the base image (#752))
ENTRYPOINT ["/entrypoint.sh"]
CMD ["dagu", "start-all"]

0 comments on commit d448d47

Please sign in to comment.