我在 alpine linux 容器中有一个小型 python 应用程序,这里是 dockerfile:
FROM alpine
# basic flask environment
RUN apk add --no-cache bash git nginx uwsgi uwsgi-python py2-pip \
&& pip2 install --upgrade pip \
&& pip2 install flask
# application folder
ENV APP_DIR /app
ENV FLASK_APP app.py
# app dir
RUN mkdir ${APP_DIR} \
&& chown -R nginx:nginx ${APP_DIR} \
&& chmod 777 /run/ -R \
&& chmod 777 /root/ -R
VOLUME [${APP_DIR}]
WORKDIR ${APP_DIR}
# copy config files into filesystem
COPY nginx.conf /etc/nginx/nginx.conf …Run Code Online (Sandbox Code Playgroud) 我希望得到特定标签的git哈希.现在我在工作中做的是:
git clone GITHUB_URL
git checkout TAG
cd REPO_NAME
export GIT_HASH=$(git log --pretty=format:%h -1)
Run Code Online (Sandbox Code Playgroud)
如果没有克隆,拉扯或退房,我有没有机会得到这个?
有没有一种简单的方法可以在 go 测试中模拟 Hashicorp 保险库?
我在 Go 中创建了一个访问 Vault 的服务,并希望为其创建适当的测试。
我没有找到我喜欢的简单解决方案(比如 python 中的 moto)。我还尝试在 docker 中以开发模式使用保险库(采用系统测试路线),但我无法通过 API 写入它。想法?