1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-25 18:28:07 +02:00
This commit is contained in:
techopsmasters 2024-05-18 16:50:55 +07:00 committed by GitHub
commit 37edbc01ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 116 additions and 208 deletions

View file

@ -10,16 +10,13 @@ RUN mvn install
FROM builder as dev-envs
RUN <<EOF
apt-get update
apt-get install -y git
EOF
RUN apt update && \
apt install -y git
RUN <<EOF
useradd -s /bin/bash -m vscode
groupadd docker
RUN useradd -s /bin/bash -m vscode && \
groupadd docker && \
usermod -aG docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD ["mvn", "spring-boot:run"]
@ -37,4 +34,4 @@ ARG DEPENDENCY=/workdir/server/target/dependency
COPY --from=prepare-production ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY --from=prepare-production ${DEPENDENCY}/META-INF /app/META-INF
COPY --from=prepare-production ${DEPENDENCY}/BOOT-INF/classes /app
ENTRYPOINT ["java","-cp","app:app/lib/*","com.company.project.Application"]
ENTRYPOINT ["java","-cp","app:app/lib/*","com.company.project.Application"]

View file

@ -15,16 +15,12 @@ ENV PORT=3000
CMD [ "npm", "start" ]
FROM development AS dev-envs
RUN <<EOF
apt-get update
apt-get install -y git
EOF
RUN apt update && \
apt install -y git
RUN <<EOF
useradd -s /bin/bash -m vscode
groupadd docker
RUN useradd -s /bin/bash -m vscode && \
groupadd docker && \
usermod -aG docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
CMD [ "npm", "start" ]